Sponsored Content
Full Discussion: Tracing a Slow MySQL Query
Top Forums Web Development Tracing a Slow MySQL Query Post 302357354 by Neo on Wednesday 30th of September 2009 05:09:37 AM
Old 09-30-2009
Quote:
Originally Posted by jim mcnamara
Arbitrary question - I've only worked Oracle & access for the last 25 years -
Can you not add indexes, update statistics, or use other tools rather than wait and hope for somebody to write an optimized query?
Yes, I can.

But it is better to search for an update first before modifying code. The chances are that it has already been fixed; so first we search for updates, talk to the developer, then if that does not give the results we need, we modify the code.

Cheers.

PS: For the first query, we have not seen any slow queries since I installed the latest version. I will continue to monitor the log. Looks better so far.

---------- Post updated 2009-09-30 at 09:09 ---------- Previous update was 2009-09-29 at 16:03 ----------

Great! No slow queries at all since I upgraded that "troublesome" vB plugin Smilie

If this continues I will tweek my.cnf from

Code:
long_query_time = 5

to

Code:
long_query_time = 4

 

6 More Discussions You Might Find Interesting

1. Programming

How to query one to many mysql

Hi there, I have a hierarchical database that include 4 tables. Table A is the parent of B, B is Parent of C, C is parent of D. If I want to query everything in D that is associated with A.name, how do I do that? Thanks! YanYan (0 Replies)
Discussion started by: pinkgladiator
0 Replies

2. UNIX and Linux Applications

MySQL Slow Queries Log: Lock_time

In MySQL's slow queries log, it'll have an entry like this: # User@Host: scc_service @ # Query_time: 43 Lock_time: 0 Rows_sent: 0 Rows_examined: 0 SET timestamp=1237769209; UPDATE loan SET funding_status="scheduled",datetime_approved=now() WHERE loan_id = '00000'; What does Lock_time... (2 Replies)
Discussion started by: zefflyn
2 Replies

3. Web Development

mysql query help

hello all i have 2 columns every column in the following format column1 2011-04-01 11:39:54 column2 2019-02-03 00:00:00 i want get difference between above data as following 2 days 11:39 how to do so ? i tried many functions but nothing works please advice what is the query... (6 Replies)
Discussion started by: mogabr
6 Replies

4. Programming

need to modify Mysql query

Hi, I want to run below query on shellscript but having one problm. ADV=$( mysql -h "$IP_ADDR" -u "$USER_NAME" "$TABLE_NAME" -BNe" SELECT ADV FROM indata where inid='$INSTRUID' and Date='$latest Date';" ) here Date column contans different below dates 2011-12-01... (0 Replies)
Discussion started by: aish11
0 Replies

5. Programming

mysql query help

Hello i have created mysql query to compare to values and get difference in percentage as following: SELECT file_name, 100 - ((100 * (SELECT file_count FROM xipi_files z WHERE x.file_group = z.file_group AND x.file_name = z.file_name AND z.insert_date = CURDATE( ) - INTERVAL 1 DAY)) /... (1 Reply)
Discussion started by: mogabr
1 Replies

6. Programming

Need help in mysql query

Hi All, i have a table in mysql with the following data Table name Test Assettype Serial_No Status location Mouse 123456 In Stock chennai Mouse 98765 Allocated chennai Keyboard ... (2 Replies)
Discussion started by: venkitesh
2 Replies
All times are GMT -4. The time now is 11:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy