Subject | Re: Limiting fetched rows doesn't offer much performance benefit |
---|---|
Author | jimbehr3446 |
Post date | 2006-03-07T21:32:27Z |
--- In firebird-support@yahoogroups.com, Richard Wesley <hawkfish@...>
wrote:
fieldname in the where clause. But, ignoring that, I believe FB will
look at every record (using an index of course if available) to
determine the complete list and then it will return the number you
specify in the FIRST n clause.
Thanks for your comments.
wrote:
>I'm not sure that query would work since you haven't specified a
> Especially if one is trying to do sampling of the table. Consider
> the query
>
> select * from table where rand() < .01;
>
> to sample a table. Ideally, this would just create a stream of rows
> and throw out 90% of them. Does FB actually have to instantiate the
> (potentially humongous) table here too?
>
fieldname in the where clause. But, ignoring that, I believe FB will
look at every record (using an index of course if available) to
determine the complete list and then it will return the number you
specify in the FIRST n clause.
Thanks for your comments.