Re: Performance problem on import
- From: "Jeff McKay" <comaxis@xxxxxxxxx>
- Date: Mon, 4 Feb 2008 23:20:42 -0800
I think I have this fixed now. I was doing an unnecessary SQLAllocHandle and SQLFree inside a tight loop which when removed got things going again. I do think it shows a bug
in the ODBC driver for Access, since I don't get the problem with SQL Server, and
there wasn't really anything wrong with the original code.
"Jeff Boyce" <nonsense@xxxxxxxxxxxx> wrote in message news:OLBg6p2ZIHA.5900@xxxxxxxxxxxxxxxxxxxxxxx
Jeff
The first place I'd check, were this mine, is the indexing in JET/Access. If the JET engine has to re-index the table after each insert, this could end up taking a long time.
If that turns out to be the issue, you could risk removing the indexing, loading it up, then re-indexing... if you are confident that the data is well-behaved<g>.
When you check for indexes, remember that Access/JET assigns an index to fields used in the relationship window -- and if you have parent-child relationships you've made explicit, Access has assigned (hidden) indexes.
Good luck!
Regards
Jeff Boyce
Microsoft Office/Access MVP
"Jeff McKay" <comaxis@xxxxxxxxx> wrote in message news:13qeovlnhghfba9@xxxxxxxxxxxxxxxxxxxxxI have created a database containing one master table, that has links to two child tables.
I am attempting to do a mass import of data to this database using a C++ program and the
ODBC API. I use the SQL "Insert" command to create a record in the master, and then
mutiple insert commands on both child tables (from 1 to 10 entries on one child, usually 0-2 on the second).
This works great, until I get to about 50 or so entries in the master table. Then everything
slows to a crawl. I see delays of 2 or 3 seconds on every insert command. Not workable
(I expect to import hundreds or thousands of records per database). Any ideas about what
is going wrong? I suspect that the JET database engine is just not very efficient, taking a long time to update key chains, etc. But I don't really understand why it works fine for the first few dozen records. Maybe some kind of memory caching?
By the way this same program works fine importing thousands of entries into SQL Server.
.
- References:
- Performance problem on import
- From: Jeff McKay
- Re: Performance problem on import
- From: Jeff Boyce
- Performance problem on import
- Prev by Date: Re: Appending into an existing Table
- Next by Date: WINDOW VISTA
- Previous by thread: Re: Performance problem on import
- Next by thread: Question About Importing Using VBA (DoCmd.TransferText)
- Index(es):
Relevant Pages
|