Re: selecting ROWNUM causes query to take forever

From: Paul Bradford <pauljNObradfordSPAM_at_yahoo.com>
Date: Mon, 29 Sep 2003 16:41:48 -0400
Message-ID: <bla597$c5m$1_at_bob.news.rcn.net>


> Paul Bradford wrote:
>
> > I have a query that takes about two minutes and returns 97 rows.
> > If I change the query only by adding ROWNUM to the outermost
> > select clause, the query never returns (I let it run overnight).
> > I'm not using ROWNUM in the where clause, I'm just selecting it.
> > I can't think of any reason that just selecting ROWNUM would make any
> > difference.

For reasons I don't understand, adding ROWNUM caused a different (and worse) execution plan. After I added some hints to get a good execution plan, my problem is solved. Received on Mon Sep 29 2003 - 22:41:48 CEST

Original text of this message