[dba-SQLServer] If or Case or 'what'?

Stuart McLachlan stuart at lexacorp.com.pg
Tue Jun 20 10:23:06 CDT 2006


On 20 Jun 2006 at 14:26, Mark A Matte wrote:

> Thanks Stuart,
> 
> This is exactly what I need.  I stripped down the original query to give
> this example.  Both tables are used in the original query.
> 
> In your opinion...if you had to get this type of info from 80 mil+ 
> recordset...as far as speed goes...would you go multiple passes into temp
> tables and join later, or case statements?
> 

Hard to tell, but I suspect in this situation that the single pass would 
prove quicker. Why not try both ways and report back :-)
-- 
Stuart





More information about the dba-SQLServer mailing list