pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
COPY with INDEXES  question
4+ messages / 3 participants
[nested] [flat]

* COPY with INDEXES  question
@ 2004-02-06 00:46 Slavisa Garic <Slavisa.Garic@infotech.monash.edu.au>
  2004-02-06 02:54 ` Re: COPY with INDEXES  question Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  2004-02-06 02:55 ` Re: COPY with INDEXES  question Rod Taylor <rbt@rbt.ca>
  0 siblings, 2 replies; 4+ messages in thread

From: Slavisa Garic @ 2004-02-06 00:46 UTC (permalink / raw)
  To: pgsql-performance

Hi,

I have a quick question. In order to speed up insertion of large number of
rows (100s of thousands) I replaced the INSERT with the COPY. This works
fine but one question popped into my mind. Does copy updates indexes on
that table if there are some defined?

Thanks,
Slavisa





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: COPY with INDEXES  question
  2004-02-06 00:46 COPY with INDEXES  question Slavisa Garic <Slavisa.Garic@infotech.monash.edu.au>
@ 2004-02-06 02:54 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  2004-02-06 02:52   ` Re: COPY with INDEXES  question Slavisa Garic <Slavisa.Garic@infotech.monash.edu.au>
  1 sibling, 1 reply; 4+ messages in thread

From: Christopher Kings-Lynne @ 2004-02-06 02:54 UTC (permalink / raw)
  To: Slavisa Garic <Slavisa.Garic@infotech.monash.edu.au>; +Cc: pgsql-performance

> I have a quick question. In order to speed up insertion of large number of
> rows (100s of thousands) I replaced the INSERT with the COPY. This works
> fine but one question popped into my mind. Does copy updates indexes on
> that table if there are some defined?

Yes, of course.  Runs triggers and stuff as well.

Chris




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: COPY with INDEXES  question
  2004-02-06 00:46 COPY with INDEXES  question Slavisa Garic <Slavisa.Garic@infotech.monash.edu.au>
  2004-02-06 02:54 ` Re: COPY with INDEXES  question Christopher Kings-Lynne <chriskl@familyhealth.com.au>
@ 2004-02-06 02:52   ` Slavisa Garic <Slavisa.Garic@infotech.monash.edu.au>
  0 siblings, 0 replies; 4+ messages in thread

From: Slavisa Garic @ 2004-02-06 02:52 UTC (permalink / raw)
  To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>; +Cc: Slavisa Garic <Slavisa.Garic@infotech.monash.edu.au>; pgsql-performance

Thanks for the reply and thanks even more for the good one :).

Cheers,
Slavisa

On Fri, 6 Feb 2004, Christopher Kings-Lynne wrote:

> > I have a quick question. In order to speed up insertion of large number of
> > rows (100s of thousands) I replaced the INSERT with the COPY. This works
> > fine but one question popped into my mind. Does copy updates indexes on
> > that table if there are some defined?
> 
> Yes, of course.  Runs triggers and stuff as well.
> 
> Chris
> 
> 




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: COPY with INDEXES  question
  2004-02-06 00:46 COPY with INDEXES  question Slavisa Garic <Slavisa.Garic@infotech.monash.edu.au>
@ 2004-02-06 02:55 ` Rod Taylor <rbt@rbt.ca>
  1 sibling, 0 replies; 4+ messages in thread

From: Rod Taylor @ 2004-02-06 02:55 UTC (permalink / raw)
  To: Slavisa Garic <Slavisa.Garic@infotech.monash.edu.au>; +Cc: pgsql-performance

On Thu, 2004-02-05 at 19:46, Slavisa Garic wrote:
> Hi,
> 
> I have a quick question. In order to speed up insertion of large number of
> rows (100s of thousands) I replaced the INSERT with the COPY. This works
> fine but one question popped into my mind. Does copy updates indexes on
> that table if there are some defined?

Copy does nearly everything that standard inserts to. RULES are the only
thing that come to mind. Triggers, indexes, constraints, etc. are all
applied.

-- 
Rod Taylor <rbt [at] rbt [dot] ca>

Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
PGP Key: http://www.rbt.ca/rbtpub.asc

Attachments:

  signature.asc (application/pgp-signature, 186B) download

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2004-02-06 02:55 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-02-06 00:46 COPY with INDEXES  question Slavisa Garic <Slavisa.Garic@infotech.monash.edu.au>
2004-02-06 02:54 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2004-02-06 02:52   ` Slavisa Garic <Slavisa.Garic@infotech.monash.edu.au>
2004-02-06 02:55 ` Rod Taylor <rbt@rbt.ca>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox