Re: COPY with INDEXES question

Поиск
Список
Период
Сортировка
Искать

Re: COPY with INDEXES question

От:
Rod Taylor <rbt@rbt.ca>
Дата:
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 

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

Re: COPY with INDEXES question

От:
Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Дата:
> 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

COPY with INDEXES question

От:
Slavisa Garic <Slavisa.Garic@infotech.monash.edu.au>
Дата:
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


Re: COPY with INDEXES question

От:
Slavisa Garic <Slavisa.Garic@infotech.monash.edu.au>
Дата:
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
> 
> 

FAQ