473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

query runtime problems - same tables joined together

I have a problem query that I could use some help. This code ran in 20 minutes last year and there is not much change in the input data this year....perhaps 10% growth. Currently this is running 8+ hours and it is unacceptable. This must run in Production next weekend, so there is little time to figure out what is wrong & fix it.
The tables we are running against are in Integration newly loaded in key order, or just recently reorg'd and have current stats.
Explain follows the query and doesn't reflect long run times. Internal monitoring shows it using DSNDB07 DSN4K02 a great deal of the time it is running.

QUERY:
SELECT A1.NEXT_NODE_ID
, A2.NEXT_NODE_ID
INTO :H , :H
FROM H6_ASSOC A1
, H6_ASSOC A2
, H6_ASSOC A3
, H6_NODE N1
, H6_NODE N2
WHERE A1.PREV_NODE_ID = :H
AND A1.ASSOC_TYPE = 3324
AND A2.PREV_NODE_ID = A1 . NEXT_NODE_ID
AND A2.ASSOC_TYPE = 3324
AND A3.PREV_NODE_ID = :H
AND A3.NEXT_NODE_ID = A2.NEXT_NODE_ID
AND A3.ASSOC_TYPE = 3323
AND N1.NODE_TYPE_ID = 3433
AND N1.NODE_ID = A1.NEXT_NODE_ID
AND N2.NODE_TYPE_ID = 3432
AND N2.NODE_ID = A2.A2.NEXT_NODE_ID ;

EXPLAIN:
STMTNO COST*RATE SQL-STATEMENT
0 109.302246 SELECT A1.NEXT_NODE_ID ,A2.NEXT_NODE_ID INTO :H, :H FRO

COST*RATE QB PL MIX QTYPE METH ACC MTCH IX TBNAME IXNAME
20.307190 1 1 0 SELECT 0 I 2 Y H6_ASSOC H6ASOCX3
26.128784 1 2 0 SELECT 1 I 1 N H6_NODE H6NODEX1
21.607697 1 3 0 SELECT 1 I 2 Y H6_ASSOC H6ASOCX2
13.491821 1 4 0 SELECT 1 I 3 Y H6_ASSOC H6ASOCX3
27.766754 1 5 0 SELECT 1 I 1 N H6_NODE H6NODEX1

Any suggetions as to why run times have increased?
Any ideas on recode or what ekse to look at?
Thanks.
Aug 20 '07 #1
0 1079

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Ed_No_Spam_Please_Weber | last post by:
Hello All & Thanks in advance for your help! Background: 1) tblT_Documents is the primary parent transaction table that has 10 fields and about 250,000 rows 2) There are 9 child tables with...
2
by: Mike Leahy | last post by:
Hello all, This question is related to updating tables - is there any way to calculate or update the values in a column in a table to the values in a field produced by a query result? An...
8
by: Carl | last post by:
Hi, I hope someone can share some of their professional advice and help me out with my embarissing problem concerning an Access INSERT query. I have never attempted to create a table with...
1
by: Eric E | last post by:
Hi, I'm trying to write a recordset-returning function that returns a values from a base table, and one column from a joined table, where the joined table varies according to a field of the base...
2
by: Fendi Baba | last post by:
I created a person table with various fields such as Suffix, Salutation, etc, Some of these fields may not be mandatory for example suffix. In the actual table itself, I only have a field for...
1
by: M | last post by:
I am trying to tie two tables of data together and I'm having some issues. table 1 has about 1700 rows table 2 has about 1000 rows table 3 has about 70 they all have one column in common,...
5
by: listerofsmeg01 | last post by:
Hi, Pretty new to PHP and MySQL. I have a page on my site that displays a lot of information from various tables. Currently I have lots of small PHP wrapper functions around SQL queries to...
12
kcdoell
by: kcdoell | last post by:
Hello: I just learned how to put crosstabs queries together but this one in particular is adding a new dimension in which I was hoping someone could give me some direction. I have the following...
5
by: Bogdan | last post by:
Hi, I have a stored procedure that uses JOINs to return columns from multiple tables. I also have another stored proc that that takes a series of params and updates multiple tables. I used the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.