Re: Delete large amount of records and INSERT (with indexes) goes VERY slow

Поиск
Список
Период
Сортировка
От Peter Nixon
Тема Re: Delete large amount of records and INSERT (with indexes) goes VERY slow
Дата
Msg-id 200304111332.26365.listuser@peternixon.net
обсуждение исходный текст
Ответ на Re: Delete large amount of records and INSERT (with indexes) goes VERY slow  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Thu April 10 2003 17:00, you wrote:
> Peter Nixon <listuser@peternixon.net> writes:
> > Yes. But that still doesn't explain the speed. I am not joking when I
> > said I was getting only ONE INSERT every 30 seconds - 1 minute!!!
>
> The insertion itself couldn't possibly take that long; the problem had
> to be in auxiliary operations invoked by the insert.  Do you have any
> triggers on that table?  Any foreign references to or from it?  What
> indexes are on the table?

There is only one index. The structure is the following..

CREATE TABLE StopVoIP (
  RadAcctId BIGSERIAL PRIMARY KEY,
  UserName VARCHAR(32) DEFAULT '' NOT NULL,
  NASIPAddress INET NOT NULL,
  AcctSessionTime BIGINT,
  AcctInputOctets BIGINT,
  AcctOutputOctets BIGINT,
  CalledStationId VARCHAR(50) DEFAULT '' NOT NULL,
  CallingStationId VARCHAR(50) DEFAULT '' NOT NULL,
  AcctDelayTime SMALLINT,
  CiscoNASPort BOOLEAN DEFAULT false,
  h323CallOrigin varchar(10) DEFAULT '' NOT NULL,
  h323SetupTime timestamp with time zone NOT NULL,
  h323ConnectTime timestamp with time zone NOT NULL,
  h323DisconnectTime timestamp with time zone NOT NULL,
  h323DisconnectCause varchar(2) DEFAULT '' NOT NULL,
  H323RemoteAddress INET NOT NULL,
  H323VoiceQuality NUMERIC(2),
  h323ConfID VARCHAR(35) DEFAULT '' NOT NULL
);
create UNIQUE index stopvoipcombo on stopvoip (h323SetupTime, nasipaddress,
h323ConfID);


--

Peter Nixon
http://www.peternixon.net/
PGP Key: http://www.peternixon.net/public.asc


В списке pgsql-general по дате отправления:

Предыдущее
От: Brad Paul
Дата:
Сообщение: pg_dump: NOTICE: ShmemAlloc: out of memory
Следующее
От: Ken Guest
Дата:
Сообщение: Re: help Request