Advertisement

02.29.2008 at 08:24AM PST, ID: 23204130
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.5

tune the query..... between dates is making the query run too slow

Asked by vishali_vishu in Oracle Database, Oracle 9.x, PL / SQL

Tags:

Hai
       i have a query which is running fine but when i changed the query to use a range between the dates
the query is running too slow

SELECT
    pd.ProjectId ProjectId,
    pd.NSDOrderNo NSDOrderNo,
    pd.LocationId LocationId,
    ttto.Description Description_to,
    pdcsli.ConnFIC ConnFIC,
    pdcsli.ConnShelfUnit x,
    (case when pdcsli.ConnShelfUnit like '%A' then replace(pdcsli.ConnShelfUnit,'A','') when pdcsli.ConnShelfUnit like '%B' then replace(pdcsli.ConnShelfUnit,'B','') when pdcsli.ConnShelfUnit like '%R' then substr(pdcsli.ConnShelfUnit,1,1) when pdcsli.ConnShelfUnit like '%T' then substr(pdcsli.ConnShelfUnit,1,1) else pdcsli.ConnShelfUnit end) ConnShelfUnit,
    pdcsli.ConnTechJackstrt ConnTechJackstrt,
    pdcsli.ConnTechMod ConnTechMod,
    pdcsli.ConnTechUnit xx,
    trim(translate(pdcsli.ConnTechUnit, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',' ')) ConnTechUnit,
    ttfrom.Description Descriptionfrom,
    pdcsli.FIC FIC,
    pdcsli.ShelfUnit y,
    (case when pdcsli.ShelfUnit like '%A' then replace(pdcsli.ShelfUnit ,'A','') when pdcsli.ShelfUnit like '%B' then replace(pdcsli.ShelfUnit,'B','') when pdcsli.ShelfUnit like '%R' then substr(pdcsli.ShelfUnit,1,1) when pdcsli.ShelfUnit like '%T' then substr(pdcsli.ShelfUnit,1,1) else pdcsli.ShelfUnit end) ShelfUnit,
    pdcsli.TechJackStart TechJackStart,
    pdcsli.TechMod TechMod,
    pd.SupplierOrderNumber SupplierOrderNumber,
    pdcsli.TechUnit TechUnit,
    to_char(pd.SENTTOSUPPLIERDATETIME, 'mm/dd/yyyy') SENTTOSUPPLIERDATETIME
FROM
  LOGIC_V_PROJDMDREQ pd,
  LOGIC_LGTECHTYPE  ttto,
  LOGIC_LGPROJDMDREQCABLESUBLI pdcsli,
  LOGIC_LGTECHTYPE  ttfrom,
  LOGIC_LGPROJDMDREQCABLELI pdcli
WHERE pdcli.ProjDmdReq_ObjectId = pd.ObjectId
AND pdcli.ConnTechType_ObjectId = ttto.ObjectId
AND ttfrom.ObjectId = pdcli.TechType_ObjectId
AND pdcsli.LineItem_ObjectId = pdcli.ObjectId
AND pdcsli.ConnShelfUnit IN ('1', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12', '21', '22', '2R', '2T', '3R', '3T', '4R', '4T', '6R', '6T', '7R', '7T', '8R', '8T', '1I', '1O', '2I', '2O', '3I', '3O', '1A', '1B', '2A', '2B', '11A', '11B', '12A', '12B', '21A', '22B', '22A', '22B', '21R', '21T', '61R', '61T')
AND ttto.Description IN ('LGX3 - LS ODF', 'NEC OADM', 'NGOL', 'NGOT', 'SPECTRALWAVE 160', 'WAVESTAR OLS')
AND ttfrom.Description IN ('LGX3 - LS ODF', 'NEC ADM', 'NEC OADM', 'NGFT', 'NGOT', 'SPECTRALWAVE 160', 'WAVESTAR OLS')
AND pd.CancelIndr = '0'
AND pdcsli.TechJackStart IS NOT NULL  
AND (pd.ProjectId LIKE 'HF%' OR pd.ProjectId LIKE 'IF%')
and pd.SENTTOSUPPLIERDATETIME between to_date('02/01/2008', 'mm/dd/yyyy')
and to_date('02/28/2008', 'mm/dd/yyyy')

ORDER BY 1, 2, 3
Start Free Trial
[+][-]02.29.2008 at 08:40AM PST, ID: 21014899

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.29.2008 at 08:45AM PST, ID: 21014965

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.29.2008 at 08:56AM PST, ID: 21015102

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.29.2008 at 09:00AM PST, ID: 21015134

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.29.2008 at 09:02AM PST, ID: 21015159

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.29.2008 at 09:50AM PST, ID: 21015685

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Oracle Database, Oracle 9.x, PL / SQL
Tags: oracle
Sign Up Now!
Solution Provided By: johnsone
Participating Experts: 3
Solution Grade: A
 
 
[+][-]02.29.2008 at 09:58AM PST, ID: 21015756

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628