Обсуждение: UPDATE and DELEte with a lot of register is to slow...

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

UPDATE and DELEte with a lot of register is to slow...

От
"John Dizaro"
Дата:
I have   to execute some times an UPDATE  an some times a DELETE  to register +- 50000  , every time when i do that 
thedatabase  be  to slow <br />do we any way to DELETE or UPDATE by part???<br />Thanks<br clear="all" /><br />-- <br
/>John Evan Dizaro  - <br /><br /><br /> 

Re: UPDATE and DELEte with a lot of register is to slow...

От
Craig Ringer
Дата:
John Dizaro wrote:
> I have   to execute some times an UPDATE  an some times a DELETE  to
> register +- 50000  , every time when i do that  the database  be  to slow
> do we any way to DELETE or UPDATE by part???

I'm not sure your post really contains enough information to answer your 
question.

If you are having problems with slow DELETEs, could it be a problem with 
a foreign key that lacks an index on the referencing (rather than 
referenced) column?

What do you mean by "to register 50000" ? Do you mean "affecting 50,000 
rows" ?

Just how slow do you mean? Is the problem that the UPDATE or DELETE 
takes a long time, or that it slows down other queries?

--
Craig Ringer


Res: UPDATE and DELEte with a lot of register is to slow...

От
paulo matadr
Дата:
did you make  analyse(vacuum ) in you database?



De: Craig Ringer <craig@postnewspapers.com.au>
Para: John Dizaro <jedsoftware@gmail.com>
Cc: pgsql-sql@postgresql.org
Enviadas: Quinta-feira, 20 de Novembro de 2008 8:29:55
Assunto: Re: [SQL] UPDATE and DELEte with a lot of register is to slow...

John Dizaro wrote:
> I have  to execute some times an UPDATE  an some times a DELETE  to
> register +- 50000  , every time when i do that  the database  be  to slow
> do we any way to DELETE or UPDATE by part???

I'm not sure your post really contains enough information to answer your question.

If you are having problems with slow DELETEs, could it be a problem with a foreign key that lacks an index on the referencing (rather than referenced) column?

What do you mean by "to register 50000" ? Do you mean "affecting 50,000 rows" ?

Just how slow do you mean? Is the problem that the UPDATE or DELETE takes a long time, or that it slows down other queries?

--
Craig Ringer

-- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes

Re: UPDATE and DELEte with a lot of register is to slow...

От
"John Dizaro"
Дата:
 The problem is ...
how to run the SCRIPT to the few?
not all the 50000 lines of "update" at the same time.
John Evan Dizaro


2008/11/20 John Dizaro <jedsoftware@gmail.com>
I have   to execute some times an UPDATE  an some times a DELETE  to register +- 50000  , every time when i do that  the database  be  to slow
do we any way to DELETE or UPDATE by part???
Thanks

--
John Evan Dizaro  -





--
John Evan Dizaro Software -
Fone: (41) 3333-0303
Fone: (41) 9243-3240
Rua: Alferes Poli Curitiba - PR - Brasil

Re: UPDATE and DELEte with a lot of register is to slow...

От
"John Dizaro"
Дата:
O Problema é tem tenho uma tabela muito grande  com chave primaria e tudo mais...
e quando eu vou fazer uma atualização de alguns campos desta tabela  o banco fica devagar  estou procurando algum comando  que me permita atualizar os registros aos poucos por exemplo uma tabela com 100 000 atualiza-la de 1 000 em 1 000 até que possa terminar assim as outros  usuarios não sentirão .
quando temos algo muito grande no postgres ele continua a reservar recursos para o processo  que eu estou rodando (neste caso a ataualização muito grande)  fazendo com qfue os outros usuarios tenham perda de desenpenho.



Obrigado


2008/11/20 John Dizaro <jedsoftware@gmail.com>
I have   to execute some times an UPDATE  an some times a DELETE  to register +- 50000  , every time when i do that  the database  be  to slow
do we any way to DELETE or UPDATE by part???
Thanks

--
John Evan Dizaro  -





--
John Evan Dizaro Software -
Fone: (41) 3333-0303
Fone: (41) 9243-3240
Rua: Alferes Poli Curitiba - PR - Brasil