Subject | Re: The First to select |
---|---|
Author | Adam |
Post date | 2006-02-13T06:46:17Z |
> > The Skip Y syntax forces the first Y to be compared etc but does notYes,
> > display them. (in case you are wondering).
>
> Adam is this your experience?
> my observations are that FIRST 10 SKIP 1000000 returns records in the
> bracket 1000000->1000010 without doing any work at all on the records
> 0->1000000
I don't know how much "work" is involved. IBPlanalyzer shows me that
20010 records in both tables are read from both tables with a simple
select first 10 skip 20000 query with a single join.
Helen, I can think of one use for a select first 1 without an order by.
We had a simple replication type system sending data to the head
office. A table would be filled by particular processes, and a polling
process would grab one record every few minutes. The order of the items
was not important to this business process, but it was important to
a) Not flood the network with data
b) Not force the database to do too much work.
Having the select first meant the database activity was a simple
natural read of a single record.
Eventually all the data would be emptied (and there was also a manual
flush process that was run, this trickle just sped the process up). To
me it is like the argument about ordering by fields not in a select
clause, there are times when it makes no sense (such as where distinct
becomes involved), but then there are times when it is useful.
Adam