How to move to create a Tmp table in memory?
Hello everyone!
I have a site with High-Loaded slow database queries. There is probably a taxonomy
for example:
Please Help Optimize Slow Query
Hello!
Help to understand what to do. I optimizes views
The first boot - everything is bad ((
Executed 350 queries in 823.4 milliseconds. Queries taking longer than 5 ms and queries executed more than once, are highlighted. Page execution time was 1367.98 ms.
Question on MYSQL INNER JOIN
SELECT node.nid AS nid, node_data_field_article_image.field_article_image_fid AS node_data_field_article_image_field_article_image_fid, node_data_field_article_image.field_article_image_list AS node_data_field_article_image_field_article_image_list, node_data_field_article_image.field_article_image_data AS node_data_field_article_image_field_article_image_data, node.type AS node_type, node.vid AS node_vid, node.title AS node_title, node.nid AS node_nid, nodequeue_nodes_node.position AS nodequeue_nodes_node_position FROM node node
access table in slow query log
Hi,
Hopefully this is an appropriate question for this group. Any ideas why this type of query would show up repeatedly in my slow query log? Is there something I can do to optimize this?
thanks.
Time: 100715 12:07:03
User@Host: drupal_db[drupal_db] @ localhost []
Query_time: 0 Lock_time: 0 Rows_sent: 0 Rows_examined: 12
SELECT 1 FROM access WHERE type = 'host' AND LOWER('67.218.116.166') LIKE LOWER(mask) AND status = 0 LIMIT 0, 1;
Time: 100715 12:08:17
User@Host: drupal_db[drupal_db] @ localhost []
Read moreAssessing Devel output (mySQL queries, memory usage)
As suggested in another thread I used the Devel module to get an overview of the mySQL queries. I used the frontpage since this is the most used and biggest page. I have some questions:
1) The Devel module displays a column "where" obviously including the function name which makes the mySQL query, but the function name links to the Drupal API which does not include custom module, i.e. I cannot see where to find the function. Is there a way to find the function to optimize?
Read moreRequest for feedback on best practices in overcoming query performance problems in D6 and beyond
It is well-known that many very useful queries that you create (on your own or via the Views module) are costly to execute because MySQL creates a temporary table and does a filesort. A common example is {node}.type='xxx' and {node}.status='yyy' order by {node_comment_statistics}.comment_count desc.
Another common example is sorting posts in reverse chron order of most recent comment timestamp, which the Views module implements as order by GREATEST({node}.changed, {node_comment_statistics}.last_comment_timestamp) DESC
Read more