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

Thread: help in finding the problem. H E L P !!!

  1. #1
    Join Date
    Dec 2000
    Posts
    12
    Hello: I am new to oracle, and I am trying to maintain some Oralce procedures written here. The problem I am having is that:

    1) I created a view on 2 tables. This works fine.
    2) when I do a select * from the view where rownum <2 just to see if the view works, the select runs for more than 3 to 4 hours and still does not return any values.

    Can some guide me as to what to look for please.

    Thanks in advance for any help.

    Gopal

  2. #2
    Join Date
    Jun 2000
    Posts
    417
    How large are the tables? Have you tried just running the query with a wrapper for the rownum? Eg

    select * from (select for view) where rownum < 2;

    What is the statement you used to create the view?

    Possibly you didn't join the tables correctly and it's doing a cartesian product. If the tables are very large it could take that long.

  3. #3
    Join Date
    Jan 2001
    Posts
    318
    Can you do select count(*) from view; just to see how many records does it have ?
    Sonali

  4. #4
    Join Date
    Nov 2000
    Location
    Baltimore, MD USA
    Posts
    1,339
    I'm not sure, but if he can't run the SELECT for ROWNUM < 2, then doing a full blown SELECT is unlikely to work as well.

    It sounds like your view is terribly non-optimized :) and what you really need help with is fixing your view.

    In order to do *that*, we will need the actual SELECT statement behind the view, and some stats on the tables involved wouldn't hurt either.

    - Chris

  5. #5
    Join Date
    Jun 2000
    Posts
    417
    Yeah I figured it wouldn't make a difference but throwing out things to try :)

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