On Monday 27 January 2003 16:01, Torsten Curdt wrote:
> Niclas Hedhman wrote:
> > On Monday 27 January 2003 07:06, Torsten Curdt wrote:
> >>>What do the database to try to find the 6th row?
> >>>
> >>>I think the answer is: scan the rest of the database after finding the
> >>>ONLY 5 rows that already exist.
> >>
> >>No :) ...be sure - it doesn't
> >
> > Well, that depends on the WHERE clause. For instance;
> >
> > WHERE SQRT(  SQ( a - b ) + SQ( c - d ) + SQ( e - f ) ) < g ;
> >
> > definately go through every record, whether the fields are indexed or
> > not.
>
> Aaah - now I got you guys! (sorry for being that slow ;)
>
> Antonio, how comes that you always know you have 5 rows? This sounds
> quite unusual to me...

I can answer part of that;

1. You have the "count" from somewhere else.
2. You know that objects of type X has N attributes, always fixed.
3. I have 10,000,000 random records of N types. I want the first one of each 
type.

Sure there are other cases.

Niclas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to