Re: Duplicated records

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Duplicated records
Дата
Msg-id 20050525174456.GC8590@surnet.cl
обсуждение исходный текст
Ответ на Re: Duplicated records  (lucas@presserv.org)
Список pgsql-sql
On Wed, May 25, 2005 at 01:58:07PM -0300, lucas@presserv.org wrote:

> The records is entire duplicated (with all fields having the same data),
> thinking the "numos" fields as primary key I have executed the query:
> 
> # DELETE from lanctos where not oid=(select oid from lanctos as l2 where
> l2.numos=lanctos.numos limit 1);

That's because you don't have an index on the Oid column.  You may want
to try using the ctid column instead; it's the physical row position in
the table so it doesn't need to scan the whole table each time.

HTH,

-- 
Alvaro Herrera (<alvherre[a]surnet.cl>)
"The only difference is that Saddam would kill you on private, where the
Americans will kill you in public" (Mohammad Saleh, 39, a building contractor)


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

Предыдущее
От: lucas@presserv.org
Дата:
Сообщение: Re: Duplicated records
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: [despammed] Re: Duplicated records