Posted by ghayoumi on June 11, 2009 at 5:05pm
I have drupal website with ~500,000 nodes and I have problem with this query:
SELECT node.nid nid
FROM node FORCE INDEX(node_created), term_node, node_counter
WHERE node.nid = term_node.nid
AND term_node.nid = node_counter.nid
AND node.created > 1244565947
AND tid =170
AND node.nid NOT IN (218892)
AND node.status=1
AND type = 'akhbar'
ORDER BY node_counter.totalcount DESC LIMIT 0 , 4
Can anyone help ?
if I don't use "FORCE INDEX(node_created)" the query is 10 times slower.
Comments
how to delete all nodes that are older than 1 year in DB ?
Hi,
Can you tell me how to delete all nodes that are older than 1 year directly in my database ?
I need to delete all nodes which type is "news" an that are older than 1 year.
Thanks a lot.
If you attempt to do it, your
If you attempt to do it, your site might end up in a miserable state.