We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

DB Performance and EXP_RELATIONSHIPS table

Development and Programming

dogma's avatar
dogma
1 posts
14 years ago
dogma's avatar dogma

I’ve seen a few posts related to the exp_relationships table and performance, but not a lot of detail yet.

I’ve just joined a site that has ~45K records (don’t let this distract you) in the exp_relationships table. We regularly see ‘UPDATE exp_relationships …’ queries in MySQLs slow_query log. Without table locks and other interference these queries can still take between 7 - 30 seconds (and occasionally much more) to complete.

I think this is inherently an issue of scale. Most of the queries we see in the slow query log need to update 100+ records in the exp_relationships table, the more records to long it takes. The serialized php record in rel_data averages around 30Kb and across ~5000 records this equates to about 180Mb that needs to be written to disk (and not in any single place).

Does anyone have some more information on what is stored in the rel_data table, and importantly (for me) why it’s possible for ee to cache so many copies of the same data?

I’m going to look at ways the DB could be optimized (indexing etc) to help improve this, but my initial thoughts are that this is going to be inherently slow just because of data volume, spread across the table. Thoughts?

Thanks

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.