Hi guys
I get a very slow query when I try to edit a node.
I just run pt-query-digest
and show me this big SELECT query which makes 2 "IN" statement with 5808 items each one.
SELECT * FROM panelizer_entity WHERE entity_type = 'node' AND entity_id IN ('12165', '12166', '12167', '12168', '12169', '12170', '12171', '12172', '12173', '12174', '
12175', '12176', '12177', '12178', '12179', '12180', '12181', '12182', '12183', '12184'/*... omitted 5808 items ...*/) AND revision_id IN ('12165', '12166', '12167', '
12168', '12169', '12170', '12171', '12172', '12173', '12174', '12175', '12176', '12177', '12178', '12179', '12180', '12181', '12182', '12183', '12184'/*... omitted 5808 items ...*/)\G
I have tried tuning my InnoDB database engine settings but unsuccessfully.
I am running Drupal 7 under Linux Mint 14 with MySQL 5.5.31 and PHP 5.4.6
Any idea?
Comments
Comment #1
merlinofchaos commentedWell, it would appear that you have, for some reason, a node_lode_multiple() that's trying to load 5,808 nodes.
That's a lot of nodes! While it's possible that query could be more efficient...that's a lot of nodes to load at once. I would back up a bit and see what you're doing to cause that.
Since revision ids should be unique, though, we don't need to load by entity_id *and* revision_id I don't think, so I could improve that query. But I don't think doing that will really solve your problem.
Comment #2
asanchez75 commentedThanks for giving me a clue!
I will disable some modules and will try again
Comment #3
damienmckennaComment #4
damienmckennaComment #5
damienmckennaNot sure what can be done here? Panelizer isn't going to load that much data on its own when editing an entity, something else is going funny on the site.