Re: [MASSMAIL]long running delete

Поиск
Список
Период
Сортировка
От Gilberto Castillo
Тема Re: [MASSMAIL]long running delete
Дата
Msg-id 41101.192.168.207.54.1467134108.squirrel@webmail.etecsa.cu
обсуждение исходный текст
Ответ на long running delete  (Mark Steben <mark.steben@drivedominion.com>)
Ответы Re: [MASSMAIL]long running delete  (Mark Steben <mark.steben@drivedominion.com>)
Список pgsql-admin
> Good morning,
>
> We have been running a delete for nearly 24 hours now.  I would like to
> verify that it is either doing what it is supposed to do or 'spinning its
> wheels'.
>
> We are running postgres 9.2.12.
>
> The delete statement is not waiting on any other transaction.
>
> I have run straces on the pid and I see lots of 'reads, lseeks, and an
> occasional semop.  I have also looked in the base directory at the file
> matched by the oid of the table (as defined in pg_class) and have seen no
> change in size.
>
> Is there somewhere else I can verify that work is / is not being done?
> Perhaps looking for something else in strace?



My recomendation,

El DELETE es prohibitivo en Cualquier gestor de BD para ello ponga a su
concideración dos formas de como mejorar su comportamiento en PostgreSQL

--Solución 1

DELETE FROM string s WHERE NOT EXISTS (SELECT 1 FROM data d WHERE
d.object_id = s.id OR d.property_id = s.id OR d.value_id = s.id);

--Solución 2

(1) CREATE TABLE copia AS SELECT (...) WHERE (...)
(2) TRUNCATE en la tabla original.
(3) INSERT (...) SELECT (...) --actualizar desde la copia la tabla original
(4) DROP TABLE copia.


>
> Thanks for your time.
>
> --
> *Mark Steben*
>  Database Administrator
> @utoRevenue <http://www.autorevenue.com/> | Autobase
> <http://www.autobase.net/>
>   CRM division of Dominion Dealer Solutions
> 95D Ashley Ave.
> West Springfield, MA 01089
> t: 413.327-3045
> f: 413.383-9567
>
> www.fb.com/DominionDealerSolutions
> www.twitter.com/DominionDealer
>  www.drivedominion.com <http://www.autorevenue.com/>
>
> <http://autobasedigital.net/marketing/DD12_sig.jpg>
>


--
Saludos,
Gilberto Castillo
ETECSA, La Habana, Cuba



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

Предыдущее
От: Mark Steben
Дата:
Сообщение: long running delete
Следующее
От: Mark Steben
Дата:
Сообщение: Re: [MASSMAIL]long running delete