MySQL Forums :: Performance :: Very slow query when too many joins


Advanced Search

Re: Very slow query when too many joins
Posted by: Rick James ()
Date: June 05, 2016 05:36PM

Here's my rant against EAV: http://mysql.rjweb.org/doc.php/eav

You do need a composite index on (ads_id, field_id). In particular it would be better to have
* ENGINE=InnoDB -- so that the PK is clustered
* PRIMARY KEY(ads_id, field_id)

In my.cnf :
optimizer_search_depth = 1

Options: ReplyQuote


Subject Views Written By Posted
Very slow query when too many joins 785 As Os 06/05/2016 09:17AM
Re: Very slow query when too many joins 429 As Os 06/05/2016 09:27AM
Re: Very slow query when too many joins 384 Peter Brawley 06/05/2016 10:14AM
Re: Very slow query when too many joins 366 As Os 06/05/2016 10:48AM
Re: Very slow query when too many joins 368 Peter Brawley 06/05/2016 10:56AM
Re: Very slow query when too many joins 332 As Os 06/05/2016 03:33PM
Re: Very slow query when too many joins 360 Peter Brawley 06/05/2016 03:41PM
Re: Very slow query when too many joins 386 Rick James 06/05/2016 05:36PM
Re: Very slow query when too many joins 336 As Os 06/06/2016 02:23AM
Re: Very slow query when too many joins 356 As Os 06/06/2016 03:33AM
Re: Very slow query when too many joins 358 As Os 06/06/2016 08:36AM
Re: Very slow query when too many joins 321 Peter Brawley 06/06/2016 08:52AM
Re: Very slow query when too many joins 377 As Os 06/06/2016 09:02AM
Re: Very slow query when too many joins 329 Peter Brawley 06/06/2016 11:16AM
Re: Very slow query when too many joins 373 Peter Brawley 06/06/2016 08:29AM
Re: Very slow query when too many joins 351 As Os 06/06/2016 11:30AM
Re: Very slow query when too many joins 373 Peter Brawley 06/06/2016 12:08PM
Re: Very slow query when too many joins 354 As Os 06/06/2016 02:11PM
Re: Very slow query when too many joins 382 Rick James 06/07/2016 03:40PM
Re: Very slow query when too many joins 295 james wang 07/20/2016 05:34AM
Re: Very slow query when too many joins 306 Rick James 07/20/2016 09:37AM
Re: Very slow query when too many joins 316 james wang 07/21/2016 04:43AM
Re: Very slow query when too many joins 281 Rick James 07/22/2016 10:59PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.