pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: Delete slow...
6+ messages / 5 participants
[nested] [flat]

* Re: Delete slow...
@ 2005-11-29 20:20  Mario Splivalo <mario.splivalo@mobart.hr>
  parent: Diego <diego@unimedijui.com.br>
  0 siblings, 1 reply; 6+ messages in thread

From: Mario Splivalo @ 2005-11-29 20:20 UTC (permalink / raw)
  To: Diego <diego@unimedijui.com.br>; +Cc: pgsql-admin

On Tue, 2005-11-29 at 18:13 -0300, Diego wrote:
> Hi,
> I have a table with 400,000 records, but in delete comand is very slow 
> (4 seconds for operation)
> Why is very slow? There is some special configuration for this?
> 
> Ps.: Version = Postgresql 7.4.6

That smells like a bad design. What do you delete from a 400.000 records
table?

I guess it's ok to be slow. 

	Mike
-- 
Mario Splivalo
Mob-Art
mario.splivalo@mobart.hr

"I can do it quick, I can do it cheap, I can do it well. Pick any two."





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

* Re: Delete slow...
@ 2005-11-29 20:36  Scott Marlowe <smarlowe@g2switchworks.com>
  parent: Diego <diego@unimedijui.com.br>
  1 sibling, 1 reply; 6+ messages in thread

From: Scott Marlowe @ 2005-11-29 20:36 UTC (permalink / raw)
  To: Diego <diego@unimedijui.com.br>; +Cc: pgsql-admin

On Tue, 2005-11-29 at 15:32, Diego wrote:
> Thanks by answers...
> 
> For each record deleted, my postgresql server spended 4 seconds...
> I know because i have logged each sql instruction, showing the time spended.
> 
> My question is: is normal this time to a big table (400,000 records)

Do you have any foreign keys involved here?  You might need some indexes
for faster lookups.

And don't worry about your english, I'm sure it's 1,000 times better
than most of our Portuguese.



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

* Delete slow...
@ 2005-11-29 21:13  Diego <diego@unimedijui.com.br>
  0 siblings, 1 reply; 6+ messages in thread

From: Diego @ 2005-11-29 21:13 UTC (permalink / raw)
  To: pgsql-admin

Hi,
I have a table with 400,000 records, but in delete comand is very slow 
(4 seconds for operation)
Why is very slow? There is some special configuration for this?

Ps.: Version = Postgresql 7.4.6

Thanks
Diego Ziquinatti







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

* Re: Delete slow...
@ 2005-11-29 21:32  Diego <diego@unimedijui.com.br>
  parent: Mario Splivalo <mario.splivalo@mobart.hr>
  0 siblings, 2 replies; 6+ messages in thread

From: Diego @ 2005-11-29 21:32 UTC (permalink / raw)
  To: pgsql-admin

Thanks by answers...

For each record deleted, my postgresql server spended 4 seconds...
I know because i have logged each sql instruction, showing the time spended.

My question is: is normal this time to a big table (400,000 records)

Thanks!
Diego Ziquinatti
 From Brazil (excuse me my english, rsrsrs)

Mario Splivalo escreveu:

>On Tue, 2005-11-29 at 18:13 -0300, Diego wrote:
>  
>
>>Hi,
>>I have a table with 400,000 records, but in delete comand is very slow 
>>(4 seconds for operation)
>>Why is very slow? There is some special configuration for this?
>>
>>Ps.: Version = Postgresql 7.4.6
>>    
>>
>
>That smells like a bad design. What do you delete from a 400.000 records
>table?
>
>I guess it's ok to be slow. 
>
>	Mike
>  
>




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

* Re: Delete slow...
@ 2005-11-29 21:39  Jim C. Nasby <jnasby@pervasive.com>
  parent: Diego <diego@unimedijui.com.br>
  1 sibling, 0 replies; 6+ messages in thread

From: Jim C. Nasby @ 2005-11-29 21:39 UTC (permalink / raw)
  To: Diego <diego@unimedijui.com.br>; +Cc: pgsql-admin

Can you provide the output of EXPLAIN ANALYZE for one of these deletes?

On Tue, Nov 29, 2005 at 06:32:43PM -0300, Diego wrote:
> Thanks by answers...
> 
> For each record deleted, my postgresql server spended 4 seconds...
> I know because i have logged each sql instruction, showing the time spended.
> 
> My question is: is normal this time to a big table (400,000 records)
> 
> Thanks!
> Diego Ziquinatti
> From Brazil (excuse me my english, rsrsrs)
> 
> Mario Splivalo escreveu:
> 
> >On Tue, 2005-11-29 at 18:13 -0300, Diego wrote:
> > 
> >
> >>Hi,
> >>I have a table with 400,000 records, but in delete comand is very slow 
> >>(4 seconds for operation)
> >>Why is very slow? There is some special configuration for this?
> >>
> >>Ps.: Version = Postgresql 7.4.6
> >>   
> >>
> >
> >That smells like a bad design. What do you delete from a 400.000 records
> >table?
> >
> >I guess it's ok to be slow. 
> >
> >	Mike
> > 
> >
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
> 

-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



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

* Re: Delete slow...
@ 2005-11-29 21:47  Guido Barosio <gbarosio@gmail.com>
  parent: Scott Marlowe <smarlowe@g2switchworks.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Guido Barosio @ 2005-11-29 21:47 UTC (permalink / raw)
  To: Scott Marlowe <smarlowe@g2switchworks.com>; +Cc: Diego <diego@unimedijui.com.br>; pgsql-admin

A good idea would be to:

1) if your spanish is strong enough, post into the -es mailing list and
kindly request for help there.
(Si tu espaniol es fuerte, escribi a la lista -es, te vas a encontrar mas
comodo con las posibles respuestas)

2) if your spanish isn't strong enough, post here again, but show us:

a) The SQL statement being used [aka the query]
b) The description of the tables involved [in your pgsql shell `\d
tablename`
c) Your server specs (OS, version, hd, ram, cpu,etc)

If you usually run this query, and it works faster you may be facing a load
in the database or in the server, or in both at the same time. Can you
ensure if this is not the case?

3) if your spanish is poor, and your english is poor, but you have enough
time, then teach us portugues :)

Best regards,
Guido Barosio
Camberley, Surrey
United Kingdom


On 11/29/05, Scott Marlowe <smarlowe@g2switchworks.com> wrote:
>
> On Tue, 2005-11-29 at 15:32, Diego wrote:
> > Thanks by answers...
> >
> > For each record deleted, my postgresql server spended 4 seconds...
> > I know because i have logged each sql instruction, showing the time
> spended.
> >
> > My question is: is normal this time to a big table (400,000 records)
>
> Do you have any foreign keys involved here?  You might need some indexes
> for faster lookups.
>
> And don't worry about your english, I'm sure it's 1,000 times better
> than most of our Portuguese.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>



--
"Adopting the position that you are smarter than an automatic
optimization algorithm is generally a good way to achieve less
performance, not more" - Tom Lane.

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


end of thread, other threads:[~2005-11-29 21:47 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-11-29 21:13 Delete slow... Diego <diego@unimedijui.com.br>
2005-11-29 20:20 ` Mario Splivalo <mario.splivalo@mobart.hr>
2005-11-29 21:32   ` Diego <diego@unimedijui.com.br>
2005-11-29 20:36     ` Scott Marlowe <smarlowe@g2switchworks.com>
2005-11-29 21:47       ` Guido Barosio <gbarosio@gmail.com>
2005-11-29 21:39     ` Jim C. Nasby <jnasby@pervasive.com>

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