pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
[Fwd: Re: RHDB just sits and does nothing?]
3+ messages / 3 participants
[nested] [flat]

* [Fwd: Re: RHDB just sits and does nothing?]
@ 2004-06-09 08:16  Mauri Sahlberg <Mauri.Sahlberg@claymountain.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Mauri Sahlberg @ 2004-06-09 08:16 UTC (permalink / raw)
  To: pgsql-admin

Hi,

What an earth I am doing wrong? I am trying to delete about 6500 rows and
I am the only user connected to the database and it just sits there and
does nothing?

Jun  9 10:02:44 pihsi postgres[31547]: [25] LOG:  query: begin;
Jun  9 10:02:44 pihsi postgres[31547]: [26] LOG:  duration: 0.000181 sec
Jun  9 10:02:51 pihsi postgres[31547]: [27] LOG:  query: set constraints
all deferred;
Jun  9 10:02:51 pihsi postgres[31547]: [28] LOG:  duration: 0.000205 sec
Jun  9 10:03:04 pihsi postgres[31547]: [29] LOG:  query: delete from
tilikartta
where yritys=18231413;

and after a long wait...
Jun  9 10:46:16 pihsi postgres[31547]: [30] LOG:  duration: 2592.534609
sec Jun  9 11:00:28 pihsi postgres[31547]: [31] LOG:  query: commit;
Jun  9 11:00:28 pihsi postgres[31547]: [32] LOG:  duration: 0.002915 sec

DELETE 6347
rahaks=# commit;
COMMIT

It just took about three quarters of a hour to delete 6500 rows!
Something is definitely broken and probably I am the one who broke it. Any
guesses what I have broken and how I could fix this?

Full log as an attachment.

Attachments:

  foo (application/octet-stream, 4.7K) download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [Fwd: Re: RHDB just sits and does nothing?]
@ 2004-06-09 13:01  Scott Marlowe <smarlowe@qwest.net>
  parent: Mauri Sahlberg <Mauri.Sahlberg@claymountain.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Scott Marlowe @ 2004-06-09 13:01 UTC (permalink / raw)
  To: Mauri Sahlberg <Mauri.Sahlberg@claymountain.com>; +Cc: pgsql-admin

On Wed, 2004-06-09 at 02:16, Mauri Sahlberg wrote:
> Hi,
> 
> What an earth I am doing wrong? I am trying to delete about 6500 rows and
> I am the only user connected to the database and it just sits there and
> does nothing?
> 
> Jun  9 10:02:44 pihsi postgres[31547]: [25] LOG:  query: begin;
> Jun  9 10:02:44 pihsi postgres[31547]: [26] LOG:  duration: 0.000181 sec
> Jun  9 10:02:51 pihsi postgres[31547]: [27] LOG:  query: set constraints
> all deferred;
> Jun  9 10:02:51 pihsi postgres[31547]: [28] LOG:  duration: 0.000205 sec
> Jun  9 10:03:04 pihsi postgres[31547]: [29] LOG:  query: delete from
> tilikartta
> where yritys=18231413;
> 
> and after a long wait...
> Jun  9 10:46:16 pihsi postgres[31547]: [30] LOG:  duration: 2592.534609
> sec Jun  9 11:00:28 pihsi postgres[31547]: [31] LOG:  query: commit;
> Jun  9 11:00:28 pihsi postgres[31547]: [32] LOG:  duration: 0.002915 sec
> 
> DELETE 6347
> rahaks=# commit;
> COMMIT
> 
> It just took about three quarters of a hour to delete 6500 rows!
> Something is definitely broken and probably I am the one who broke it. Any
> guesses what I have broken and how I could fix this?

Do you have any foreign key references that are of mismatched types
involved?




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [Fwd: Re: RHDB just sits and does nothing?]
@ 2004-06-09 13:46  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Scott Marlowe <smarlowe@qwest.net>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2004-06-09 13:46 UTC (permalink / raw)
  To: Scott Marlowe <smarlowe@qwest.net>; +Cc: Mauri Sahlberg <Mauri.Sahlberg@claymountain.com>; pgsql-admin

"Scott Marlowe" <smarlowe@qwest.net> writes:
> On Wed, 2004-06-09 at 02:16, Mauri Sahlberg wrote:
>> It just took about three quarters of a hour to delete 6500 rows!

> Do you have any foreign key references that are of mismatched types
> involved?

Specifically, what other tables reference this one?  Are their
referencing columns of identical types, and *do they have indexes*?

I'm betting on lack of index myself; that's the only FK mistake that
hurts you only at primary-key-delete time.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2004-06-09 13:46 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-06-09 08:16 [Fwd: Re: RHDB just sits and does nothing?] Mauri Sahlberg <Mauri.Sahlberg@claymountain.com>
2004-06-09 13:01 ` Scott Marlowe <smarlowe@qwest.net>
2004-06-09 13:46   ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox