Thread: UPDATE and DELEte with a lot of register is to slow...
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 />
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
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
The problem is ...<br /><div dir="ltr" id="result_box" style="text-align: left;"><div dir="ltr" id="result_box" style="text-align:left;">how to run the SCRIPT to the few? <br />not all the 50000 lines of "update" at the same time.<br/> John Evan Dizaro<br /></div></div><br /><br /><div class="gmail_quote">2008/11/20 John Dizaro <span dir="ltr"><<ahref="mailto:jedsoftware@gmail.com">jedsoftware@gmail.com</a>></span><br /><blockquote class="gmail_quote"style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> 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 <br />do we any way to DELETE or UPDATE by part???<br />Thanks<br clear="all" /><font color="#888888"><br/> -- <br /> John Evan Dizaro - <br /><br /><br /></font></blockquote></div><br /><br clear="all" /><br/>-- <br />John Evan Dizaro Software - <br />Fone: (41) 3333-0303<br />Fone: (41) 9243-3240<br />Rua: Alferes Poli Curitiba- PR - Brasil<br />
O Problema é tem tenho uma tabela muito grande com chave primaria e tudo mais...<br />e quando eu vou fazer uma atualizaçãode alguns campos desta tabela o banco fica devagar estou procurando algum comando que me permita atualizaros registros aos poucos por exemplo uma tabela com 100 000 atualiza-la de 1 000 em 1 000 até que possa terminarassim as outros usuarios não sentirão .<br /> quando temos algo muito grande no postgres ele continua a reservarrecursos para o processo que eu estou rodando (neste caso a ataualização muito grande) fazendo com qfue os outrosusuarios tenham perda de desenpenho.<br /><br /><br /><br />Obrigado<br /><br /><br /><div class="gmail_quote">2008/11/20John Dizaro <span dir="ltr"><<a href="mailto:jedsoftware@gmail.com">jedsoftware@gmail.com</a>></span><br/><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> I have to execute sometimes an UPDATE an some times a DELETE to register +- 50000 , every time when i do that the database be to slow<br />do we any way to DELETE or UPDATE by part???<br />Thanks<br clear="all" /><font color="#888888"><br /> -- <br />John Evan Dizaro - <br /><br /><br /></font></blockquote></div><br /><br clear="all" /><br />-- <br />John Evan DizaroSoftware - <br />Fone: (41) 3333-0303<br />Fone: (41) 9243-3240<br />Rua: Alferes Poli Curitiba - PR - Brasil<br />