| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: SQL Humor
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 Thu Aug 18 2005 - 17:13:28 CDT
![]() |
![]() |