Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: SQL Humor

Re: SQL Humor

From: paul c <toledobythesea_at_oohay.ac>
Date: Fri, 19 Aug 2005 22:59:05 GMT
Message-ID: <ZutNe.67553$vj.6142@pd7tw1no>


Hugo Kornelis wrote:
> On 18 Aug 2005 15:13:28 -0700, Mikito Harakiri wrote:
>
>

>>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

>
>
> Hi Mikito,
>
> As Mike said: absolutely no difference between the two.
>
>
>
>>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.

>
>
> SQL Server will often produce the same execution for both versions. If
> performance is really critical, always test all versions. If performance
> is important but not criticat, use EXISTS - I've seen cases where it's
> faster than IN, but I haven't seen the reverse yet.
>
>
>
>>Well, making sure the
>>extents and segments are layed out on disk properly, leaves little room
>>for education and abstract thinking.

>
>
> Huh? I don't know what your DMBS of choice is, but SQL Server doesn't
> bother the DBA with extents and segments.
>
> Best, Hugo

i don't mean to single anybody out, but much of the talk lately has been about domains and syntax of domains. in spite of the many messages about 'equality', i get the impression that very few people take the minimalist view that i do which is that the RM only gets confused by these questions. and that for some of us, the confusion is never-ending if they are entertained. 'equality', if you will, is fundamentally a point-of-view, from the RM's perspective. it just seems to me that the RM becoms simpler (a possible advantage being simpler implementation) if questions about reality are kept out of it. obviously, when i say 'keep reality out of it', many people will start flaming about 'what good is it then?', but i'll try to ignore them as i attempt to understand the 'theory'. the big questions for the RM, *for me* seem to include view updatability which has to do with the operators of the algebra as well as whether a relational engine can implement customary features such as concurrency control and presentation coherence without being written in a language that eschews the relational operators.

thanks again for listening to my rant!

pc Received on Fri Aug 19 2005 - 17:59:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US