Re: SQL Humor

From: Mikito Harakiri <mikharakiri_nospaum_at_yahoo.com>
Date: 18 Aug 2005 15:13:28 -0700
Message-ID: <1124403208.369312.277020_at_z14g2000cwz.googlegroups.com>


Hugo Kornelis wrote:
> On 18 Aug 2005 13:17:37 -0700, Mikito Harakiri wrote:
> >pondering if
> >
> >select * from table
> >
> >is faster than
> >
> >select col1, col2, ... from table
>
> No need to ponder that -- all SQL Server DBAs (and presumably all DBAs
> for all serious RDBMS's) know that SELECT * should never be used in
> production code (except in a EXISTS(..) subquery).

My bad. I meant

select count(1) from table

vs.

select count(*) from table

BTW, you triggered the other example: is EXISTS or IN faster? This question could come up only from somebody who is completely unaware of SQL expression equivalency and query rewrite. Well, making sure the extents and segments are layed out on disk properly, leaves little room for education and abstract thinking. Received on Fri Aug 19 2005 - 00:13:28 CEST

Original text of this message