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: counting rows

Re: counting rows

From: David Cressey <dcressey_at_verizon.net>
Date: Fri, 31 Mar 2006 11:19:55 GMT
Message-ID: <vf8Xf.1709$Se.730@trndny01>

"paul c" <toledobythesea_at_oohay.ac> wrote in message news:h7%Wf.201992$sa3.129417_at_pd7tw1no...
> bucaliman_at_gmail.com wrote:
> > Consider the tables USERS and PICTURES. When retrieving the number of
> > pictures from a user there are two ways:
> >
> > 1) I count them from pictures table.
> > 2) I pick it directly from a field "numPictures" in table users.
> >
> > How are you used to do this? Which is better?
> > Thanks
> >
>
> In a way, it's like the riddles about changing light bulbs (the one I
> like best is 'how many psychiatrists?' - answer 'only one but the light
> bulb has to want to change'). When even mainframes took a second or two
> to count to a million it seemed the fastest way to do that was store
> (pardon me, I should have said 'memorize') the number in the database.
> I think it depends on what the number means to you and what if anything
> its production means to you. I don't believe that any DB dogma has
> anything useful in the sense of right or wrong to say about this.
>
> pc

My favorite is "how many Zen Buddhists does it take to change a light bulb?

Two: one to change the light bulb, and the other to NOT change the light bulb. Received on Fri Mar 31 2006 - 05:19:55 CST

Original text of this message

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