Never ending query
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Never ending query

  1. #1
    Join Date
    Sep 2006
    Posts
    1

    Never ending query

    Ok, I have a query that when run, runs forever and never returns values. Any ideas?

    Code:
    Select Distinct WORK_CENTER.SITE, SFC.STATUS_BO
      From WORK_CENTER, SFC_STEP, SFC
     Where WORK_CENTER.SITE = 'TEST'
      And Parse_Handle(SFC_STEP.REPORTING_CENTER_BO,2) = 'TEST'

  2. #2
    Join Date
    Feb 2005
    Posts
    158
    Don't run the query ?

    Seriously, you need to understand the concept of joins.
    You have no link between SFC_STEP and SFC. Maybe SFC_STEPs have an SFC_ID that says they relate to a particular row in the SFC table. You may know that, but you haven't 'told' that query to use that relationship.

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    What's it waiting on?

    What's the plan?

    http://marist89.blogspot.com/2005/07/trace-it_04.html
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  4. #4
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    No join between tables ??

    Try FIRST_ROWS hint, and see you get rows.

    Tamil

  5. #5
    Join Date
    Nov 2002
    Location
    Mooresville, NC
    Posts
    349
    Oh boy, you are screwing the query royally. Use the joins as mentioned by gamyers.
    http://www.perf-engg.com
    A performance engineering forum

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width