473,790 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

remark on a slowdown of COPY

Hi,

I would like to remark on a problem described by Stephen Livesey
almost
3 years ago, about the slowdown he had experienced with an upload of
several
millions of rows.

http://www.geocrawler.com/mail/threa...ecords&list=12
The first 100,000 records took 15mins.
The next 100,000 records took 30mins
The last 100,000 records took 4hours.


I'm actually uploading data from a pg_dump file with the COPY command,
it's about 2.5 mil. rows on a 1.6 GHz Linux PC, 512MB, with raiserfs.

I had to dump schema and tables separately ending up in the following
series of steps:

CREATE TABLE keys (
crc integer NOT NULL,
tablenr integer NOT NULL,
tableid integer NOT NULL,
tableref integer NOT NULL,
"key" character varying(250) NOT NULL,
batchid integer NOT NULL
);

ALTER TABLE ONLY keys ADD CONSTRAINT keys_pkey PRIMARY KEY (crc);

COPY keys (crc, tablenr, tableid, tableref, "key", batchid) FROM
stdin;
-265889347 1 2 0
1_1_1982_1_101_ 1011_NULL_NULL_ NULL_102_NULL 1

....

\.

With created index (prim.key) I stopped it half-way through after 2
hours,
getting progressively slower. Strangely, in top the CPU usage and
IO were < 5%, jumping up a bit every now and then, but system load
showed steadily values of over 2 (something internal?, Tom Lane once
mentioned fsync?).

Then without an index (when I removed the ADD CONSTRAINT line), the
upload
time soared to 11 minutes, including index creation afterwards, load
around 1.

The problem with me was that I was dumping schema and tables
separatelly,
thus letting ADD CONSTRAINT be issued in the shown sequence (before
data
were uploaded), otherwise ADD CONSTRAINT goes at the end of the table
dump file, not affecting the perfromance.

--Vojtech
Nov 12 '05 #1
0 1215

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

Similar topics

5
3942
by: Trevor Perrin | last post by:
After running a simple loop around 100-200 million times, there's a speed drop of about a factor of 7. This happens within several minutes (on a 1.7 Ghz machine), so it's not that hard to see. I'm using Python 2.3.2 under Windows. Is anyone familiar with this? import time startTime = time.time() x = 0
3
1622
by: Nicke | last post by:
Hi, I've used vb.net for 3 hours(!) now and have probably a very easy question. In my VB6 programs I use For Each Cell in Range... very often which not seems to work in vb.net. Ex. Dim Cell As Excel.Range Dim xl as Excel.Application
8
2053
by: Sebastian Werner | last post by:
Howdy, I currently develop the javascript toolkit qooxdoo (http://qooxdoo.sourceforge.net), some of you heard it already. We have discovered a slowdown on Internet Explorers performance when creating objects with some data and store them in a global object registry. It take some time to get this example extracted from our codebase. The attached file (take a look at it please) shows the exact problem. The time for each object increases...
22
2359
by: Bradley | last post by:
Has anyone else noticed this problem? I converted the back-end to A2000 and the performance problem was fixed. We supply a 97 and 2000 version of our software so we kept the backend in A97 to make upgrading simple for users. We've done it like that for years but a new client has been having severe performance issues... solved by converting the backend to 2000. -- regards, Bradley
3
1658
by: tac-tics | last post by:
I have an application written in jython which has to process a number of records. It runs fine until it gets to about 666 records (and maybe that's a sign), and then, it's performance and responsiveness goes down the toilet. It looks like it's running out of memory and is being forced to use extended memory, but I do not know enough about the language to figure out where this is happening. It will eventually finish the task, but the window...
4
3645
by: =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= | last post by:
Hi, On a simple form, I have a ListBox control. This listbox control is loaded with around 800 text items of somewhat short length. There are also some other controls on the form, buttons. When the form need to repaint itself after e.g. maximize, it happens somewhat slow, I can see the buttons redrawn one by one. I realy do not understand why. If I load twice the amount of text into the list control, the form repaint itself twice as...
7
1535
by: Tom wilson | last post by:
Hi! I have a massive SQL 2000 database that needs records extracted into another database. so I write a VB.Net (2005) program that simply queries the records I need, populates a new record in the new database and so on. There's no data transformation, it's a direct record to record copy. So I run this thing and numbers are flying by at a rate of about 30 records per second. Within an hour, it gradually slows down to one
0
882
by: guillaume weymeskirch | last post by:
Hello everybody, To test the python 2.5 garbage collector, I wrote a trivial script allocating dummy objects of various sizes, then forgetting them in a loop. The garbage collector seems working well, limiting the memory used. But I've noticed a near linear slowdown of the execution : after a few minutes - and several millions of allocated and freed objects, each iteration take more and more time to execute.
0
1248
by: skip | last post by:
guillaumeBut I've noticed a near linear slowdown of the execution : guillaumeafter a few minutes - and several millions of allocated and guillaumefreed objects, each iteration take more and more time to guillaumeexecute. I ran your script on my Mac and let it go for over an hour. The times printed near the end were not that different than the times near the start. First few prints:
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9512
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9986
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7530
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5422
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3707
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.