Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Re: COPY Perfor...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 9 Topic 15455 of 16557
Post > Topic >>

Re: COPY Performance

by lists@[EMAIL PROTECTED] ("Hans Zaunere") May 5, 2008 at 04:14 PM

> > > > We're using a statement like this to dump between 500K and >5
> > > > million rows.
> > > >
> > > > COPY(SELECT SomeID FROM SomeTable WHERE SomeColumn > '0')
> > > >   TO '/dev/shm/SomeFile.csv'
> > > >
> > > > Upon first run, this operation can take several minutes.  Upon
> > > > second run, it will be complete in generally well under a minute.
> > > >
> > > Hmmm ... define "first" versus "second".  What do you do to return
> > > it to the slow state?
> >
> >  Interesting that you ask.  I haven't found a very reliable way to
> >  reproduce this.
> >
> >  Typically, just waiting a while to run the same query the second
> >  time will reproduce this behavior.  I restarted postgresql and i
> >  was reproduced as well.  However, I can't find a way to flush
> >  buffers/etc, to reproduce the
> 
> what happens if you do something like:
> 
> select count(*) from (select ...);
> 
> i.e. don't make the .csv file each time.  How's the performance
> without making the csv versus making it?

It's the same.

And regarding the /dev/shm, we do watch that memory doesn't become
contentious.  We've also done the dump to another set of disk spindles,
and
we've seen the same performance.

So at the end of the day, it certainly does seem like a read-bottleneck
off
of the disks.  Unfortunately, from a hardware perspective, there's not
much
we can do about it currently.

Does anyone have any experiences they can share about using partitioning
or
index tricks to speed up what should be basically large contiguous rows
from
a table, based on a single column WHERE constraint?

H



-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 9 Posts in Topic:
COPY Performance
lists@[EMAIL PROTECTED]   2008-05-04 19:11:35 
Re: COPY Performance
tgl@[EMAIL PROTECTED] (T  2008-05-04 19:41:01 
Re: COPY Performance
lists@[EMAIL PROTECTED]   2008-05-05 08:18:07 
Re: COPY Performance
scott.marlowe@[EMAIL PROT  2008-05-04 18:11:15 
Re: COPY Performance
lists@[EMAIL PROTECTED]   2008-05-05 08:11:44 
Re: COPY Performance
scott.marlowe@[EMAIL PROT  2008-05-05 09:01:21 
Re: COPY Performance
lists@[EMAIL PROTECTED]   2008-05-05 16:14:08 
Re: COPY Performance
scott.marlowe@[EMAIL PROT  2008-05-05 09:03:15 
Re: COPY Performance
scott.marlowe@[EMAIL PROT  2008-05-05 09:08:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 13:04:49 CDT 2008.