Never ending query.

  • Greetings.

    I have a query which does not seem to end.

    I have a view which queries two tables. When selecting top n from view, it's fine. Sometimes.

    Top 1000 works.

    Top 1000000 Works.

    When I remove top n it dies.

    There are 12.5 million rows in the underlying table.

    Running the select which makes up the view works.

    Running a query (Select * into XXX From vw_XXX) never ends.

    Yesterday, with 24 million rows, it works. Then the table was truncated and repopulated. Now, it's dead.

    I am busy running a checkDB but that will take a couple hours.

    One thing I did notice (Which may not be related) was when I select (Using QA) top 10000, it only returned 498 rows. Then stalled.

    It did this a couple times. Select top 499 did the same. 498 was fine. Different connection ID did not do this. Could this mean something?

     

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • I've seen similar issues with data corruption. Or QA having issues rendering the result set.

    Does select count(*) work?

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply