Re: Count(*)ing nested tables
- From: "John Currier" <md4curvs@xxxxxxxxx>
- Date: 26 Jul 2005 07:43:51 -0700
> > Benchmark it. It will differ by RDBMS. In all likelihood using the primary
> > key in the count would probably be most efficient. Usually there is an
> > index on the primary key and the optimizer might use the index to get the
> > row count.
> > Jim
>
> Thanks Jim. I'm trying out the different approaches now. I can't
> optimize it for any specific RDBMS though as the tool needs to remain
> independent.
It looks like the performance of "select(*)" and "select(pk)" is
equivalent, at least under Oracle. "select(1)" lags quite a bit
behind, so I'll probably use it when the other fails.
Thanks,
John
http://schemaspy.sourceforge.net
.
- References:
- Count(*)ing nested tables
- From: John Currier
- Re: Count(*)ing nested tables
- From: Bill Karwin
- Re: Count(*)ing nested tables
- From: John Currier
- Re: Count(*)ing nested tables
- From: Jim Kennedy
- Re: Count(*)ing nested tables
- From: John Currier
- Count(*)ing nested tables
- Prev by Date: Re: Count(*)ing nested tables
- Next by Date: Re: Count(*)ing nested tables
- Previous by thread: Re: Count(*)ing nested tables
- Next by thread: Lotus Approach formula too long
- Index(es):
Relevant Pages
|