🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #5211

Re: Clarification on AutoInc fields

#5211
From: Giuliano
Date: Wed, 04 Jul 2001 21:40
24 lines
2066 bytes
On Wed, 4 Jul 2001 22:31:34 +0200, "Umberto Uderzo" <umberto@uderzo.it> wrote:

>Sure your suggestion will improve the performance.
>Anyway i think that a COUNT(*) on a decent DBMS will not decrease so much
>the performance, since this is a particular query (DBMS should mantain tha
>record count of a table i think).

Sure, a RDBMS could treat the count(*) on tables in special manner in order to
improve the performance, but if you have a query with joins (or a where clause
with non trivial expression exists) this still wouldn't to be so true.

For example, a count(*) using a where clause that involves a column that isn't
indexed, at the best, would to imply a linear reading of all rows in order to
determine what's the resulting set. 

In fact, like user of the RDBMS (the client generating the request to RDBMS),
you wouldn't be able to know if you are doing a count(*) with a real table or
with a view using, for example, one or more medium / complex joins.

My 2 cents

Ciao!

Giuliano
Technical Details
Message-ID: <3b448816.363089384@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!news-was.dfn.de!news-koe1.dfn.de!RRZ.Uni-Koeln.DE!nntp.CS.Uni-Magdeburg.De!PeerFeed.KWeb.on.ca!dnews
References: <3b3b532b$1_2@dnews> <3B3BD2D2.5F446F35@temporaldoorway.com> <3b3c3ad2_1@dnews> <3b3c7c38_1@dnews> <3b40f10e_2@dnews> <3b42e1b1_2@dnews> <3b437c61_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,2eab2f6830ef7732
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-07-04 14:50:37 PST
From: gcardinali@remove.adhoc.net (Giuliano)
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: Clarification on AutoInc fields
Date: Wed, 04 Jul 2001 21:40:30 GMT
Message-ID: <3b448816.363089384@newsgroups.borland.com>
References: <3b3b532b$1_2@dnews> <3B3BD2D2.5F446F35@temporaldoorway.com> <3b3c3ad2_1@dnews> <3b3c7c38_1@dnews> <3b40f10e_2@dnews> <3b42e1b1_2@dnews> <3b437c61_2@dnews>
X-Newsreader: Forte Agent 1.5/32.451
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 194.183.65.61
X-Trace: dnews 994283128 194.183.65.61 (4 Jul 2001 14:45:28 -0700)
Lines: 24
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!news-was.dfn.de!news-koe1.dfn.de!RRZ.Uni-Koeln.DE!nntp.CS.Uni-Magdeburg.De!PeerFeed.KWeb.on.ca!dnews