473,406 Members | 2,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Appending to existing table painfully slow on network and 'out ofmemory' error

Bri
Hi,

First let me explain the process I have going on, then I'll address the
problems I'm having:
1) Insert records in a temp table using a query
2) Using a query that joins the temp table with TableA Insert records
into TableB
3) Delete records from temp Table
4) Table specs;
temp Table - 4 fields, 3 indexes, gets 100-4500 records inserted
TableA - 53 fields, 21 Indexes, 11 Relationships, ~25,000 records
TableB - 17 Fields, 10 Indexes, 5 Relationships, ~130,000 records
5) Environment Specs;
Development PC - P4-1.6Ghz, 512 Mb RAM, WinXP Pro SP1
Production PC - Celeron 1Ghz, 256 Mb RAM, WinXP Pro SP1, Networked
to an older server specs not available but its not that speedy. Both FE
and BE on Network (not ideal, but it hasn't caused any slowdowns until
this one).

Heres the problem; using the extreme end of this process (ie 4500
records in the temp Table) this takes 9 seconds to process on my
development PC, but takes ~15 minutes on the Production PC. I tried
enclosing the process in a Transaction to try and speed it up. This
results in no noticable increase in speed, but it does cause an 'out of
memory' error to occur if the user has any other applications running at
the same time. The Insert to the temp Table takes only ~30 secs and the
Inserts into the existing table take the rest. Same number of records,
but vastly different process times.

I've been reading the recommondations in the MS KB
(http://support.microsoft.com/default...b;en-us;889588)
and see that appends with a WinXP client below sp2 can be slow, but then
shouldn't both appends be slow? Is it maybe all the indexes and
relationships (15 total) that are slowing it down? Many of the items
mentioned in the KB article are changes on the server side and it could
be a hassle to convince the SA to play with the registry. Does using the
Transaction force the data to not be allowed to go into the swap file?
It really doesn't seem like it should be a lot of data to hold in RAM
(Task Manager - Network tab shows ~6 MB of data transfered to the
workstation in the first 2 min, then almost no network traffic for the
rest of the process).

Any ideas on what I should try next?

--
Bri

Nov 13 '05 #1
4 2115

Bri wrote:
Hi,

First let me explain the process I have going on, then I'll address the
problems I'm having:
1) Insert records in a temp table using a query
2) Using a query that joins the temp table with TableA Insert records
into TableB
3) Delete records from temp Table
4) Table specs;
temp Table - 4 fields, 3 indexes, gets 100-4500 records inserted
TableA - 53 fields, 21 Indexes, 11 Relationships, ~25,000 records
TableB - 17 Fields, 10 Indexes, 5 Relationships, ~130,000 records
5) Environment Specs;
Development PC - P4-1.6Ghz, 512 Mb RAM, WinXP Pro SP1
Production PC - Celeron 1Ghz, 256 Mb RAM, WinXP Pro SP1, Networked
to an older server specs not available but its not that speedy. Both FE
and BE on Network (not ideal, but it hasn't caused any slowdowns until
this one).

Heres the problem; using the extreme end of this process (ie 4500
records in the temp Table) this takes 9 seconds to process on my
development PC, but takes ~15 minutes on the Production PC. I tried
enclosing the process in a Transaction to try and speed it up. This
results in no noticable increase in speed, but it does cause an 'out of
memory' error to occur if the user has any other applications running at
the same time. The Insert to the temp Table takes only ~30 secs and the
Inserts into the existing table take the rest. Same number of records,
but vastly different process times.

I've been reading the recommondations in the MS KB
(http://support.microsoft.com/default...b;en-us;889588)
and see that appends with a WinXP client below sp2 can be slow, but then
shouldn't both appends be slow? Is it maybe all the indexes and
relationships (15 total) that are slowing it down? Many of the items
mentioned in the KB article are changes on the server side and it could
be a hassle to convince the SA to play with the registry. Does using the
Transaction force the data to not be allowed to go into the swap file?
It really doesn't seem like it should be a lot of data to hold in RAM
(Task Manager - Network tab shows ~6 MB of data transfered to the
workstation in the first 2 min, then almost no network traffic for the
rest of the process).

Any ideas on what I should try next?

--
Bri


This is a total shot in the dark. How about breaking 2) into two
parts. Create the records that are to be inserted into TableB, then
insert them. Compare the durations of those two operations to the
duration of doing it all at once. That should give you a better idea
of where the bottleneck is. Also, make a copy of TableB without
relationships. See if inserting into that table takes about the same
time.

James A. Fortune

Nov 13 '05 #2
Bri


ji********@compumarc.com wrote:
Bri wrote:
Hi,

First let me explain the process I have going on, then I'll address the
problems I'm having:
1) Insert records in a temp table using a query
2) Using a query that joins the temp table with TableA Insert records
into TableB <snip>Any ideas on what I should try next?

--
Bri

This is a total shot in the dark. How about breaking 2) into two
parts. Create the records that are to be inserted into TableB, then
insert them. Compare the durations of those two operations to the
duration of doing it all at once. That should give you a better idea
of where the bottleneck is. Also, make a copy of TableB without
relationships. See if inserting into that table takes about the same
time.

James A. Fortune


I've figured out a change that eliminates TableA entirely (added the PK
for it to the temp Table as that was really all I needed) so the Insert
only involves the Temp Table and some fixed values. Made no difference
to the timing. Still very fast on my PC, very slow on production PC and
'out of memory error' with a Transaction. :(

I'll try the no indexes/relationships test on Monday or Tuesday and see
if it makes any difference. If it does, then I guess I've got to walk
the Index collection ad delete the indexes, do the insert, then recreate
the indexes. Sounds like a pain.

Any other ideas? Anyone?

--
Bri
Nov 13 '05 #3
>> Still very fast on my PC, very slow on production
PC and 'out of memory error' with a Transaction.


at first I would think that the indexes may be slowing it down.. IMHO
10 indexes on a 17 field table seems like overkill, but since it only
takes 9 seconds on your machine, then this is likely not the issue...
your machine does have twice the memory as the production machine...
also, users are more likely to be running additional apps that are
eating up valuable memory as well... it may be worth a try figuring out
exactly what apps are running via Task Manager... there may be a
process that's running on the user's machine, that's interfering with
the update process.. I would disable any start-up programs, and clear
out the Start Up folder as well, as a test... also, is it possible that
an anti-virus scan is interfering? Is it possible that this user is
running into locking issues?

Mark
ac*********@aol.com

Nov 13 '05 #4
Over Sunday morning coffee I cannot help but speculate on the notion of
a join between a local temp table with a remote (permanent) table.
How does JET effect this?
Does it use indexes?
If there are no existing indexes for the two tables does it create
temporary indexes?
Does it use a table scan?
Does it bring all the relevant data (index or table) from the remote
table to the local machine across the network and effect the join
there? (If so are there problems of concurrency; could such a join be
updateable?).
Or does it go search across the network for the relevant record(s) in
the remote table each time the local table pinter is moved?
Although the remote table is probably static in the join, does JET feel
it's required to check its relationships?

It seems that JET either has to move bunches of data before the append,
or worse, during the append.

Oh wait! Both the FE and the BE are on the network? So how would that
work? The datasets required for the join would both have to come to the
local machine? Or the whole mechanics of the join would come from the
FE to the local machine to the BE?

I've never found a situation where it is necessary to use a temp table.

Here are some things I would try:

1) Ditch the temp table and insert the records directly into Table B.
or
2) Use an ADO disconnected recordset based on Table B. Update and
append the required records. Do a batch update. (You can even make this
a form's recordset).
or (ugh)
3)
Copy the temp table to the BE. Put a query in the BE that does the join
and append you want. Open another instance of Access programatically;
within that open the BE and run the query and delete the temp table.
(Need to address compacting the BE too). Better still do it with ADO
and don't open another instance of Access; use VB to create an
executable that does it, or, my favourite, Windows Script and JScript.

Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: j askey | last post by:
I have a strange bandwidth issue that I have finally tracked down to something fairly specific if anyone has any ideas... Setup: Win2003 Server, PHP 4.3.4, IIS6.0, ISAPI Network: DSL line with...
16
by: mamo74 | last post by:
Hello. I am administering a SQL Server (Enterprise Edition on Windows 2003) from some month and can't understand what is going on in the latest week (when the db grow a lot). The DB is around...
15
by: Nathan Bloomfield | last post by:
How many fields can a table have before it is considered inefficient? The table's records will eventually number in the thousands (about 3000 per year).
6
by: Access Newbie | last post by:
I'm using Access 2000 and I'm trying to create a pass-through query to append all the data from a local table to a remote table. I'm using the SQL query editor in MS Access to create the query (I...
1
by: oasd | last post by:
I'm having difficulty appending data. I have an import macro (using the Transferspreadsheet function) to import data from an excel spreadsheet (located in a USB attached to the pc) to an access...
2
by: info | last post by:
I can successfully open a recordset based upon an Excel sheet in Access, but I can't work out how to copy all the records to an Access table. Any pointers?
3
by: Marc Castrechini | last post by:
Forgive me on the lack of specifics but I am not a "server" guy. We just rolled our code out to a 2003 Server from Win2k Server and for some reason our pages are painfully slow. It appears the...
4
by: rdemyan via AccessMonster.com | last post by:
My application is calculation intensive and the servers are agonizingly slow. Administrators of my application only update the backends once a month (twice a month max). So, my launching program...
3
by: HSXWillH | last post by:
I've looked through the site and not found what I'm looking for here. I am not code-versed or anything like that so my skills are rudimentary at best. I'm using Access 03 on a Windows Vista...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.