Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: What's fast way to get total of records
Connor McDonald <connor_mcdonald_at_yahoo.com> wrote in message news:<3F7413C8.28CD_at_yahoo.com>...
> zhao wrote:
> >
> > Hi,
> >
> > Can someone tell me what's fast way to get total of records in a table
> > except using "select count(*)" statement? Can I get the information from a
> > system table?
> >
> > Thanks,
> >
> > Andy
>
> select count(*) from my_table sample(0.00001)
when i do a sample that small I get zero. I found that added a bitmap index to a column that doing a count off the column with an index hint is remarkably fast. bitmap creation took about 2 minutes on a 20m row table that is 4.2 GBs. Received on Fri Sep 26 2003 - 11:56:41 CDT