Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Old 08-04-2009, 03:56 AM   #1 (permalink)
Junior Member
 
Join Date: 06-29-09
Posts: 19
iTrader: 0 / 0%
Latest Blog:
None

gilbertsavier in the red
mysql query performance issue

Hi All,

I am using testlink tool with mysql ( teamst.org/phpBB2/viewtopic.php?t=1938 ).

I have found that this query takes 54 secs to fetch data..which is not acceptable..
I am not conversant with mysql tuning...

SELECT
NHB.parent_id AS testsuite_id, NHA.parent_id AS tc_id,
NHB.node_order AS z, T.tcversion_id AS tcversion_id,
T.id AS feature_id, TCV.active,
E.id AS exec_id, E.tcversion_id AS executed,
E.testplan_id AS exec_on_tplan, UA.user_id,UA.type,
UA.status, UA.assigner_id,
COALESCE(E.status,'n') AS exec_status
FROM
nodes_hierarchy NHA JOIN nodes_hierarchy NHB ON NHA.parent_id = NHB.id
JOIN testplan_tcversions T ON NHA.id = T.tcversion_id
JOIN tcversions TCV ON NHA.id = TCV.id
JOIN executions E ON (NHA.id = E.tcversion_id AND E.testplan_id=T.testplan_id AND E.build_id=21 )
LEFT OUTER JOIN user_assignments UA ON UA.feature_id = T.id
WHERE T.testplan_id=30397
AND (UA.type=1 OR UA.type IS NULL)
AND E.status='p'
AND E.id IN ( SELECT MAX(id) FROM executions WHERE testplan_id=30397 GROUP BY tcversion_id,testplan_id )
ORDER BY testsuite_id,NHB.node_order,tc_id,E.id ASC;



Any help to bring down the sql execution time would be highly appreciated.
__________________
Thanks & regards,
Lokananth
<a href="http://www.mioot.com">Live Chat Software</a> By miOOt
gilbertsavier is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-04-2009, 07:59 AM   #2 (permalink)
v7n Mentor
 
Izzmo's Avatar
 
Join Date: 11-01-03
Location: Kansas City
Posts: 1,338
iTrader: 0 / 0%
Latest Blog:
Starting p90x today

Izzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web pro
Send a message via ICQ to Izzmo Send a message via AIM to Izzmo Send a message via MSN to Izzmo Send a message via Yahoo to Izzmo
Well, you are joining a lot of tables together.. and that's your main problem.

What exactly are you trying to do with this query? (And what type of information are you getting from it?? text.. binary data, etc)
__________________
Izzmo
Coding Guru Extraordinaire
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
Izzmo is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql query problem (php) songwritingfever Coding Forum 3 05-03-2006 01:39 PM
MySQL Query Question Thanol Coding Forum 6 01-17-2006 01:06 PM
Mysql Query & HTTP_POST_VARS onlinegamenet Coding Forum 4 03-01-2005 10:19 AM
MYSQL Update Query Limit Coding Forum 1 12-26-2004 10:08 PM
mysql / php search query robpicken Coding Forum 0 07-28-2004 05:26 AM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 08:55 PM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.