Re: [SQL] Too much time to delete 19000 rows

2006-10-06 Thread Tom Lane
"Ezequias Rodrigues da Rocha" <[EMAIL PROTECTED]> writes: > The selection takes less than 1 second but on delete I wait more than 4 > minutes and notthing. Can someone tell me what could happen ? Perhaps foreign keys referencing this table and no indexes on the referencing columns? You're not req

Re: [SQL] Too much time to delete 19000 rows

2006-10-06 Thread Andrew Sullivan
On Fri, Oct 06, 2006 at 03:10:01PM -0300, Ezequias Rodrigues da Rocha wrote: > > BEGIN WORK; > delete from base.ticket where session_id = 17 and cash_id = 99 and promo_id > = 5; > COMMIT WORK; Try putting EXPLAIN ANALYSE on the beginning to see what's going on. That said. . . > I just think it

[SQL] Too much time to delete 19000 rows

2006-10-06 Thread Ezequias Rodrigues da Rocha
Hi list,I am having many problems to delete a table with only 19000 rows.The selection takes less than 1 second but on delete I wait more than 4 minutes and notthing. Can someone tell me what could happen ? I tryed only one transaction but it does not work too:BEGIN WORK; delete from base.ticket wh