Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: anyway to estimate number of rows in a query?

Re: anyway to estimate number of rows in a query?

From: Ryan Gaffuri <rgaffuri_at_cox.net>
Date: 24 Dec 2003 05:34:51 -0800
Message-ID: <1efdad5b.0312240534.36f4a679@posting.google.com>


"Jim Kennedy" <kennedy-downwithspammersfamily_at_attbi.net> wrote in message news:<Nm7Gb.464792$275.1358790_at_attbi_s53>...
> "Ryan" <rgaffuri_at_cox.net> wrote in message
> news:hO4Gb.45332$hf1.10390_at_lakeread06...
> > We have a search screen that is used all the time. We are supposed to
> > include a count of total records(since we will only be returning 25 at a
> > time). I want to get rid of this. Its very costly. I know I can use the
> > explain plan for this(i would use a global temp table, to get rid of
> locking
> > issues), but Im concerned about unnecessary queries on the data dictionary
> > causing contention.
> >
> > any other suggestions? How do you handle search screens of this sort when
> > users really want a total count of records found?
> > also, how do i turn on autotrace from pl/sql? or something that resembles
> > it? I think autotrace is a sqlplus command.
> >
> > I really want to get these counts out.
> >
> >
> There are no locking issues. You do not need a temp table. This is not SQL
> Server. Look at asktom.oracle.com and do a search. Best way is to just
> give them 25 at a time and NOT try to count.
> Jim

yes you should use a global temp table with the explain plan. you run into update locks on it. i believe its on asktom. test it. it happens. Received on Wed Dec 24 2003 - 07:34:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US