🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Clarification on AutoInc fields

#5210
From: Umberto Uderzo
Date: Wed, 04 Jul 2001 20:31
19 lines
1648 bytes
Hello Yakunin,

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

Ciao... Umberto Uderzo

> SELECT gen_id(generator_name,1), COUNT(*) FROM  table_name
>
> will decrease perfomance of the application if table you are selecting
from
> has lots of records.
>
> So I'd like to suggest the following solution:
> 1. In database should be created special table with only record.
> 2. Select statement should be changed as follows:
> SELECT gen_id(<generator_name>, 1) from <name_of _table_with_only_record>
Technical Details
Message-ID: <3b437c61_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!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>

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 13:28:33 PST
From: "Umberto Uderzo" <umberto@uderzo.it>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3b3b532b$1_2@dnews> <3B3BD2D2.5F446F35@temporaldoorway.com> <3b3c3ad2_1@dnews> <3b3c7c38_1@dnews> <3b40f10e_2@dnews> <3b42e1b1_2@dnews>
Subject: Re: Clarification on AutoInc fields
Date: Wed, 4 Jul 2001 22:31:34 +0200
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 62.10.19.109
Message-ID: <3b437c61_2@dnews>
X-Trace: dnews 994278497 62.10.19.109 (4 Jul 2001 13:28:17 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews