MySQL Forums
Forum List  »  Performance

Re: Very slow query when too many joins
Posted by: Rick James
Date: July 20, 2016 09:37AM

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

Written By
June 05, 2016 09:17AM
June 05, 2016 09:27AM
June 05, 2016 10:48AM
June 05, 2016 03:33PM
Re: Very slow query when too many joins
July 20, 2016 09:37AM

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.