Subject | Re: [ib-support] sql and speed |
---|---|
Author | Jason Chapman (JAC2) |
Post date | 2002-04-26T12:37:18Z |
Without table structures / index structures / population of qty / amoutn of
RAM available for cache etc, difficult to tell.
If only 10% of records had a qty >0 and the record was very wide, then yes,
definately. If 80% of records had a qty >0 then unlikely as the data would
be retrieved in qty order, thus making a lot on jumping around in the data
pages (hence the cache caveat).
So in most cases, no, it will be slower.
JAC.
"Duilio Foschi" <dedalus@...> wrote in message
news:3.0.1.32.20020425201114.006d128c@......
RAM available for cache etc, difficult to tell.
If only 10% of records had a qty >0 and the record was very wide, then yes,
definately. If 80% of records had a qty >0 then unlikely as the data would
be retrieved in qty order, thus making a lot on jumping around in the data
pages (hence the cache caveat).
So in most cases, no, it will be slower.
JAC.
"Duilio Foschi" <dedalus@...> wrote in message
news:3.0.1.32.20020425201114.006d128c@......
> is this query
>
> select sum(qty) from table1
>
> faster than
>
> select sum(qty) from table1
> where qty<>0
>
> ?
>
> TIA
>
> Duilio Foschi
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>