473,388 Members | 1,574 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,388 software developers and data experts.

Query tuning help, please

Rob
HI,

Query from a 9i db. Suggestions? Explain plan cost is 296787. Ouch.
Any help would be much appreciated.

SELECT WWLINK_THA_DATASET.FX_ID, WWLINK_DIE.UPDATE_DM,
WWLINK_DIE.DIAT_ORAT_DT, WWLINK_DIE.FYAT_ID,
WWLINK_DIE.OL_ID, WWLINK_DIE.OS_NR,
WWLINK_DIE.OR_ROW_NR, WWLINK_DIE.OR_COL_NR,
WWLINK_THA_DATASET.OL_ID, WWLINK_THA_DATASET.OS_NR,
WWLINK_THA_DATASET.OR_ROW_NR, WWLINK_THA_DATASET.OR_COL_NR,
WWLINK_THA_DATASET.DIAT_ORAT_DT, WWLINK_THA_DATASET.FYAT_ID,
WWLINK_THA_DATASET.UPDATE_DM FROM WWLINK_DIE,
WWLINK_THA_DATASET
WHERE ( WWLINK_DIE.UPDATE_DM >= to_date('10/08/2003 05:23:25')
OR WWLINK_THA_DATASET.UPDATE_DM >= to_date('10/15/2003
02:02:22'))
AND WWLINK_THA_DATASET.WF_ID = WWLINK_DIE.WF_ID
AND WWLINK_THA_DATASET.DI_ROW_NR = WWLINK_DIE.DI_ROW_NR
AND WWLINK_THA_DATASET.DI_COL_NR = WWLINK_DIE.DI_COL_NR
AND WWLINK_THA_DATASET.WF_ID is not null
AND WWLINK_THA_DATASET.DI_ROW_NR is not null
AND WWLINK_THA_DATASET.DI_COL_NR is not null

Cheers,
Rob
rroot -at criadvantage -dot com
Jul 19 '05 #1
2 2479
sm*********@yahoo.com (Rob) wrote in message news:<fd**************************@posting.google. com>...
HI,

Query from a 9i db. Suggestions? Explain plan cost is 296787. Ouch.
Any help would be much appreciated.

SELECT WWLINK_THA_DATASET.FX_ID, WWLINK_DIE.UPDATE_DM,
WWLINK_DIE.DIAT_ORAT_DT, WWLINK_DIE.FYAT_ID,
WWLINK_DIE.OL_ID, WWLINK_DIE.OS_NR,
WWLINK_DIE.OR_ROW_NR, WWLINK_DIE.OR_COL_NR,
WWLINK_THA_DATASET.OL_ID, WWLINK_THA_DATASET.OS_NR,
WWLINK_THA_DATASET.OR_ROW_NR, WWLINK_THA_DATASET.OR_COL_NR,
WWLINK_THA_DATASET.DIAT_ORAT_DT, WWLINK_THA_DATASET.FYAT_ID,
WWLINK_THA_DATASET.UPDATE_DM FROM WWLINK_DIE,
WWLINK_THA_DATASET
WHERE ( WWLINK_DIE.UPDATE_DM >= to_date('10/08/2003 05:23:25')
OR WWLINK_THA_DATASET.UPDATE_DM >= to_date('10/15/2003
02:02:22'))
AND WWLINK_THA_DATASET.WF_ID = WWLINK_DIE.WF_ID
AND WWLINK_THA_DATASET.DI_ROW_NR = WWLINK_DIE.DI_ROW_NR
AND WWLINK_THA_DATASET.DI_COL_NR = WWLINK_DIE.DI_COL_NR
AND WWLINK_THA_DATASET.WF_ID is not null
AND WWLINK_THA_DATASET.DI_ROW_NR is not null
AND WWLINK_THA_DATASET.DI_COL_NR is not null

Cheers,
Rob
rroot -at criadvantage -dot com
cost is completely irrelevant. Ignore it. posting the explain plan and
the number of records in each table is far more helpful.

some quick points:

WHERE ( WWLINK_DIE.UPDATE_DM >= to_date('10/08/2003 05:23:25') OR WWLINK_THA_DATASET.UPDATE_DM >= to_date('10/15/2003
02:02:22'))


forces a full table scan. do you want an index scan? then you need a
function based index.

i cant give you any more info than that. i need more information.
Jul 19 '05 #2
Hi,

Don't need function based index here.

Dias

rg******@cox.net (Ryan Gaffuri) wrote in message news:<1e**************************@posting.google. com>...
sm*********@yahoo.com (Rob) wrote in message news:<fd**************************@posting.google. com>...
HI,

Query from a 9i db. Suggestions? Explain plan cost is 296787. Ouch.
Any help would be much appreciated.

SELECT WWLINK_THA_DATASET.FX_ID, WWLINK_DIE.UPDATE_DM,
WWLINK_DIE.DIAT_ORAT_DT, WWLINK_DIE.FYAT_ID,
WWLINK_DIE.OL_ID, WWLINK_DIE.OS_NR,
WWLINK_DIE.OR_ROW_NR, WWLINK_DIE.OR_COL_NR,
WWLINK_THA_DATASET.OL_ID, WWLINK_THA_DATASET.OS_NR,
WWLINK_THA_DATASET.OR_ROW_NR, WWLINK_THA_DATASET.OR_COL_NR,
WWLINK_THA_DATASET.DIAT_ORAT_DT, WWLINK_THA_DATASET.FYAT_ID,
WWLINK_THA_DATASET.UPDATE_DM FROM WWLINK_DIE,
WWLINK_THA_DATASET
WHERE ( WWLINK_DIE.UPDATE_DM >= to_date('10/08/2003 05:23:25')
OR WWLINK_THA_DATASET.UPDATE_DM >= to_date('10/15/2003
02:02:22'))
AND WWLINK_THA_DATASET.WF_ID = WWLINK_DIE.WF_ID
AND WWLINK_THA_DATASET.DI_ROW_NR = WWLINK_DIE.DI_ROW_NR
AND WWLINK_THA_DATASET.DI_COL_NR = WWLINK_DIE.DI_COL_NR
AND WWLINK_THA_DATASET.WF_ID is not null
AND WWLINK_THA_DATASET.DI_ROW_NR is not null
AND WWLINK_THA_DATASET.DI_COL_NR is not null

Cheers,
Rob
rroot -at criadvantage -dot com


cost is completely irrelevant. Ignore it. posting the explain plan and
the number of records in each table is far more helpful.

some quick points:

WHERE ( WWLINK_DIE.UPDATE_DM >= to_date('10/08/2003 05:23:25')
OR WWLINK_THA_DATASET.UPDATE_DM >= to_date('10/15/2003
02:02:22'))


forces a full table scan. do you want an index scan? then you need a
function based index.

i cant give you any more info than that. i need more information.

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Mahesh Hardikar | last post by:
Hi , Oracle 8.1.7.0.0 on HP-UX 11.0 I am a newbie as far as PL-SQL is concerned . I have Sybase/MSSQL T-SQL background. We have a report which uses a select statement . This select...
3
by: soni29 | last post by:
hi, i need some help with a query, also to find out if this is even possible with sql. currently i have a table with the following data: CustomerNumber CustomerBranch 123 NULL 123 1...
3
by: Maryam | last post by:
Hi, I am having problems getting anything useful out of the index tuning wizard. I have created a table and inserted data into it. When i run the index tuning wizard i expect 2 indexes to be...
9
by: majsen | last post by:
Hi, I have problem running this query. It will time out for me... My database are small just about 200 members. I have a site for swaping appartments (rental). my query should look for match in...
5
by: renny | last post by:
Dear Oracle/DB2 DBAs, I'm looking for advice on tuning Oracle 9i and DB2 8.1 for rollbacks. I have a number of developers, who each build and test our client/server database application...
1
by: Peter Alberer | last post by:
Hi there, i have a problem with a query that uses the result of a plsql function In the where clause: SELECT assignments.assignment_id, assignments.package_id AS package_id,...
4
by: Raj | last post by:
Hi all, I have couple of questions some one plzz help 1.I have a query which run for 2 hours on my production machine, it returns 1.5 millon rows, i looked at the explain plan it is picking up...
5
by: reachsamdurai | last post by:
Greetings, I have the following query which takes very long time to execute hence can you please help to fine tune it as I'm new to DB2 World. Thanks SELECT char(VEH_IDENT_NBR) as...
3
by: dba_222 | last post by:
Dear experts, I hate to ask such a seemingly dumb question. But I have spent some time trying to solve this already to no avail. When I was using my query analyzer last, a few months ago, I...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.