http://qs321.pair.com?node_id=688222


in reply to Re: A profiling surprise ...
in thread A profiling surprise ...

More specifically, shift the IO burden away from the connection between your program and the database.

I'm sure there are other monks with even better advice, but these will help quite a bit.

UPDATE: fixed thinko s/WHEN/WHERE/ (thanks, kyle, for pointing that out in a msg).

Replies are listed 'Best First'.
Re^3: A profiling surprise ...
by Jenda (Abbot) on May 24, 2008 at 13:04 UTC

    For the last I'd rather say, select a row by the clustered index if you know it, it's unique and you want just that row. Not sure other databases use the same terminology as MSSQL, but in MSSQL the clustered index is the index that controls the order in which the data are actually stored so it's the fastest one to use. And it doesn't have to be the primary key.

    I agree completely with the rest!