Re: Work table
От | Adrian Klaver |
---|---|
Тема | Re: Work table |
Дата | |
Msg-id | 526DA820.7090605@gmail.com обсуждение исходный текст |
Ответ на | Re: Work table (Robert James <srobertjames@gmail.com>) |
Ответы |
Re: Work table
|
Список | pgsql-general |
On 10/27/2013 02:48 PM, Robert James wrote: > On 10/27/13, Adrian Klaver <adrian.klaver@gmail.com> wrote: >>> Is there another problem here? Perhaps something to do with >>> triggerring autovacuum? >> >> Is there a FK relationship involved? >> >> Could we see the schema for another_table? > > > 1. No FK > 2. I removed the indexes from the table > TRUNCATE takes only 40 ms, but the INSERT still takes 10s! So how many records are we talking about? Also complete this sentence :) INSERT INTO another_table SELECT ... In other words what is the SELECT statement for the INSERT? Also, you mentioned the above was in a function. What is the function body and how is it being called? > 3. ALTER TABLE another_table SET (autovacuum_enabled = true, > toast.autovacuum_enabled = true); didn't seem to make a difference > > 4. Here's the schema: > > > CREATE TABLE another_table > ( > id serial NOT NULL, > eventtime timestamp without time zone NOT NULL, > reporter character varying NOT NULL, > loc character varying NOT NULL, > city character varying NOT NULL, > stanza character varying, > purdue character varying, > CONSTRAINT segment_pkey PRIMARY KEY (id) > ) > > -- Adrian Klaver adrian.klaver@gmail.com
В списке pgsql-general по дате отправления: