🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Speed up Database

#4468
From: Vassiliev V.V.
Date: Sat, 05 Jan 2002 11:50
99 lines
4837 bytes
With OLEDB Direct (CreateAndFillJetTable demo) creation of database (analog
of ADOX.Catalog.Create) takes 0.06 sec and filling table with 10 integer
columns by 1000 rows takes 0.481 sec. on my PII-300. The same for dBase 5
table (through Jet 4 provider) - 3.114 sec. for creating db (table) and
0.371 sec. filling it, for Excel 97/200 (through Jet 4 provider) -
creation - 0.420 sec. and filling 1000 rows - 0.101 sec. Filling Access
table by 100 000 rows takes 55.310 sec. for Jet 4 provider and 20.790 sec.
for Jet 3.5 provider.

About "authorization problem": You should set ProviderName property to
"Microsoft Jet 4.0 OLEDB provider" (you will see "Microsoft.Jet.OLEDB.4.0"
in this property, that is wrigth) and set "Properties" property - in dialog,
set DBPROP_INIT_DATASOURCE to path to your database). Do not use
InitializationString, properties in OLEDB Direct are stored in "properties"
list, not as connection string, but Client Cursor Engine returns a lot
properties that you did not pass in connection string. This will be fixed in
next release (InitializationString will be read-only). Properties you see
are fetched from OLEDB provider. On Jet 4 you can set DBPROP_AUTH_USERID,
DBPROP_AUTH_PASSWORD and, may be DBPROP_JETOLEDB_ENGINE in
DBPROPSET_JETOLEDB_DBINIT group (this is engine type, i.e. Jet4x db, Jet3x
or Excel or dBase etc.). On TOLEDBRowset, TOLEDBDataset, TOLEDBCommand
objects you should set Flags property to set an activity you need, by
default they are forward-only and do not always support even bookmarks, but
that is fastest way to fetch data).

Even using ADO components you can update your DB faster that you did (use
server cursor),
but not so fast as wih OLEDB Direct, and db file will grow very much with
ADO componets.

OLEDB Direct could be used also on MS SQL Server for very fast inserting
rows, using IRowsetFastLoad interface. This way a added 1 000 000 rows in 1
minute 5 sec. (DB was created with files enough large to hold so much data,
table had 3 integer columns). That way is not accessible from ADO, but only
works with MS SQL Server.

Regards,
Viatcheslav V. Vassiliev

"Markus" <markus.kemetter@suunto.com> �������/�������� � �������� ���������:
news:3c3463ec$1_1@dnews...
>
>
>
> I've been trying to create a fast connection to a local MS Access database
> using ADO components in BCB5. When inserting records into a very small
test
> db for insertion speed measurement, I got 17 seconds for 1000 records
using
> ADO-Jet 4.0 to with MS Access. Comparing to 0.7 seconds with IBX and IB6
> MSAccess seems pretty lousy. Am I doing something wrong or is it reality?
>
> Vassiliev, I tried to use your components as well, but didn't manage to
> create a connection (jet4-MS Access) due to an "authorisation problem"
which
> I didn't understand.
>
> Thanks for any help on using MS Access as dircectly as possible and as
fast
> as possible.
>
> regards,
> Markus
>
>
>
> "Vassiliev V.V." <vv_vas@iname.com> wrote in message
> news:3c2e658b_1@dnews...
> > Try OLEDB Direct at http://www.oledbdirect.com. It uses OLEDB directly,
> > without ADO. I added 1 million rows at 1 minute 5 seconds on PII-300 on
> SQL
> > Server with these components.
> >
> > Vassiliev V.V.
> >
> >
> > "Avex" <I@dont.like.spammar> ???????/???????? ? ???????? ?????????:
> > news:3c1eb21f_1@dnews...
> > > Hi all,
> > >
> > > I have a large records , I need to post them into db,
> > > but it needs long time to such a thing. Is there a
> > > way to speed up ? My codes are as below:
> > > I use ADO.
> > >
> > > for (i=0;i<9800000;i++)
> > > {
> > > Table1->Append();
> > > Table1->FieldByName("f1")->AsString = f1[i];
> > >
........................................................................
> > > Table1->FieldByName("fn")->AsString = fn[i];
> > > Table1->Post();
> > > }
> > >
> >
> >
>
>
Technical Details
Message-ID: <3c36e964_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!hub.org!hub.org!PeerFeed.KWeb.on.ca!KWeb!dnews
References: <3c1eb21f_1@dnews> <3c2e658b_1@dnews> <3c3463ec$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-05 04:03:08 PST
From: "Vassiliev V.V." <vv_vas@iname.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3c1eb21f_1@dnews> <3c2e658b_1@dnews> <3c3463ec$1_1@dnews>
Subject: Re: Speed up Database 
Date: Sat, 5 Jan 2002 14:50:25 +0300
Lines: 107
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.133.192
Message-ID: <3c36e964_1@dnews>
X-Trace: dnews 1010231652 62.118.133.192 (5 Jan 2002 03:54:12 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!hub.org!hub.org!PeerFeed.KWeb.on.ca!KWeb!dnews