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: July 20, 2016 09:37AM

James...
Each 'attribute' (field_id:value pair) needs a JOIN to look up (for a given ads_id).
(His original posting said "183" twice, that was probably a typo.)

The large number of JOINs is one of the evils of EAV schema design. (The index I suggested makes them faster.)

The slowdown at 26 joins is another evil. (The setting I suggested may help with that.)

The bottom line is that EAV does not scale and should be avoided. He needs 29 or so lookups. With JSON, only 1 is needed. Instead, the application splits apart the JSON and formats the output. But that is much faster.

Options: ReplyQuote


Subject Views Written By Posted
Very slow query when too many joins 743 As Os 06/05/2016 09:17AM
Re: Very slow query when too many joins 411 As Os 06/05/2016 09:27AM
Re: Very slow query when too many joins 364 Peter Brawley 06/05/2016 10:14AM
Re: Very slow query when too many joins 344 As Os 06/05/2016 10:48AM
Re: Very slow query when too many joins 343 Peter Brawley 06/05/2016 10:56AM
Re: Very slow query when too many joins 316 As Os 06/05/2016 03:33PM
Re: Very slow query when too many joins 341 Peter Brawley 06/05/2016 03:41PM
Re: Very slow query when too many joins 364 Rick James 06/05/2016 05:36PM
Re: Very slow query when too many joins 316 As Os 06/06/2016 02:23AM
Re: Very slow query when too many joins 338 As Os 06/06/2016 03:33AM
Re: Very slow query when too many joins 337 As Os 06/06/2016 08:36AM
Re: Very slow query when too many joins 295 Peter Brawley 06/06/2016 08:52AM
Re: Very slow query when too many joins 354 As Os 06/06/2016 09:02AM
Re: Very slow query when too many joins 309 Peter Brawley 06/06/2016 11:16AM
Re: Very slow query when too many joins 353 Peter Brawley 06/06/2016 08:29AM
Re: Very slow query when too many joins 334 As Os 06/06/2016 11:30AM
Re: Very slow query when too many joins 343 Peter Brawley 06/06/2016 12:08PM
Re: Very slow query when too many joins 327 As Os 06/06/2016 02:11PM
Re: Very slow query when too many joins 363 Rick James 06/07/2016 03:40PM
Re: Very slow query when too many joins 272 james wang 07/20/2016 05:34AM
Re: Very slow query when too many joins 285 Rick James 07/20/2016 09:37AM
Re: Very slow query when too many joins 299 james wang 07/21/2016 04:43AM
Re: Very slow query when too many joins 266 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.