🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Speed up Database

#4484
From: Vassiliev V.V.
Date: Wed, 09 Jan 2002 09:13
65 lines
3790 bytes
Yes, it does, specially if your DB is on your hard drive. If it is somewhere
on the net (local or internet) and on faster computer  then you should check
both variants. The quickest method is to update database directly, wihtout
using SQL commands (in form of stored procedures or queries).

For MS Access it is IRowsetUpdate interface on OLEDB (fastest way) or
Recordset.AddNew and Recordset.Update (not UpdateBatch, Access itsself does
not support batch updates) on ADO. Interbase, as I know, supports only SQL
based updates. Sometimes enough fast could be updates using prepared SQL
queries (when SQL query is created one time, prepared and then is used with
different parameters).

For MS SQL Server faster way to create table (or insert many rows) is
IRowsetFastLoad interface. It is only available through OLEDB (or components
that use OLEDB like OLEDB Direct, http://www.oledbdirect.com). Using this
interface there is possible to create a table with 1 000 000 (one million)
rows in 1 minute 5 sec. on PII-300 (this can take around 10 sec on modern
computers).

You should take into account that client cursor fetchs data from db and then
closes it, when server cursor maintains rowset (recordset) open. And, if you
need 1-2 updates per minute (for example, when data are entered manually) to
db on the server to which many clients are connected, you should choose
client cursor. But, if your program uses database exclusively, or if you
need make a lot of updates, server cursor is preferred.

"Avex" <I@dont.like.spammar> �������/�������� � �������� ���������:
news:3c3ab7de$1_1@dnews...
>
>
> So, changing the cursor between client and server makes
> very obvious difference  in speed?
>
> And , the quickest method is using stored procedure ?
>
>
> "Vassiliev V.V." <vv_vas@iname.com> wrote :3c36e962_1@dnews...
> > You are wrong, at least what concerning MS Access and ADO (or Client
> Cursor
> > Engine in OLEDB). MS Access does not support batch updates, they could
be
> > done only on ClientCursor. I will citate "Optimistic Remote Updating in
> the
> > Client Cursor Engine" article from "Microsoft Data Access Technical
> > Articles" help file:
> >
> > "In optimistic remote updating, the key to the complexity is that the
CCE
> > does not "own" the data it is ultimately updating. Instead, the data is
> > owned by some specific provider, and the CCE must submit update requests
> in
> > the form of SQL commands. (This is also sometimes referred to as
> query-based
> > updating, or QBU.) "
> >
> > So, data are not updated directly, but by executing SQL commands.
Parsing
> > SQL command takes much more time then just updating data and batch
> updatings
> > on ClientCursor could be 100-1000 times slower then inserting rows on
> server
> > cursor.
> >
>
>
Technical Details
Message-ID: <3c3c198c_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews
References: <3c1eb21f_1@dnews> <3C34767A.1060706@kalos-inc.com> <3c36e962_1@dnews> <3c3ab7de$1_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,77d6545c02a2aaf5
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-01-09 02:31:07 PST
From: "Vassiliev V.V." <vv_vas@iname.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3c1eb21f_1@dnews> <3C34767A.1060706@kalos-inc.com> <3c36e962_1@dnews> <3c3ab7de$1_1@dnews>
Subject: Re: Speed up Database 
Date: Wed, 9 Jan 2002 12:13:09 +0300
Lines: 67
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
x-mimeole: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 62.118.136.112
Message-ID: <3c3c198c_1@dnews>
X-Trace: dnews 1010571660 62.118.136.112 (9 Jan 2002 02:21:00 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews