pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
sort_mem affect on inserts?
5+ messages / 4 participants
[nested] [flat]

* sort_mem affect on inserts?
@ 2004-11-17 21:31 David Parker <dparker@tazznetworks.com>
  2004-11-17 22:07 ` Re: sort_mem affect on inserts? Josh Berkus <josh@agliodbs.com>
  0 siblings, 1 reply; 5+ messages in thread

From: David Parker @ 2004-11-17 21:31 UTC (permalink / raw)
  To: pgsql-performance

I understand that the sort_mem conf setting affects queries with order by, etc., and the doc mentions that it is used in create index. Does sort_mem affect the updating of indexes, i.e., can the sort_mem setting affect the performance of inserts?

- DAP
----------------------------------------------------------------------------------
David Parker    Tazz Networks    (401) 709-5130
 



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

* Re: sort_mem affect on inserts?
  2004-11-17 21:31 sort_mem affect on inserts? David Parker <dparker@tazznetworks.com>
@ 2004-11-17 22:07 ` Josh Berkus <josh@agliodbs.com>
  2004-11-19 14:34   ` Re: sort_mem affect on inserts? Jan Wieck <JanWieck@Yahoo.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Josh Berkus @ 2004-11-17 22:07 UTC (permalink / raw)
  To: pgsql-performance; +Cc: David Parker <dparker@tazznetworks.com>

David,

> I understand that the sort_mem conf setting affects queries with order by,
> etc., and the doc mentions that it is used in create index. Does sort_mem
> affect the updating of indexes, i.e., can the sort_mem setting affect the
> performance of inserts?

Only if the table has Foriegn Keys whose lookup might require a large sort.   
Otherwise, no.

-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco



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

* Re: sort_mem affect on inserts?
  2004-11-17 21:31 sort_mem affect on inserts? David Parker <dparker@tazznetworks.com>
  2004-11-17 22:07 ` Re: sort_mem affect on inserts? Josh Berkus <josh@agliodbs.com>
@ 2004-11-19 14:34   ` Jan Wieck <JanWieck@Yahoo.com>
  2004-11-19 20:25     ` Re: sort_mem affect on inserts? Josh Berkus <josh@agliodbs.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Jan Wieck @ 2004-11-19 14:34 UTC (permalink / raw)
  To: josh@agliodbs.com; +Cc: pgsql-performance@postgresql.org, David Parker <dparker@tazznetworks.com>

On 11/17/2004 5:07 PM, Josh Berkus wrote:

> David,
> 
>> I understand that the sort_mem conf setting affects queries with order by,
>> etc., and the doc mentions that it is used in create index. Does sort_mem
>> affect the updating of indexes, i.e., can the sort_mem setting affect the
>> performance of inserts?
> 
> Only if the table has Foriegn Keys whose lookup might require a large sort.   
> Otherwise, no.
> 

Hmmm ... what type of foreign key lookup would that be? None of the RI 
generated queries has any order by clause.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



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

* Re: sort_mem affect on inserts?
  2004-11-17 21:31 sort_mem affect on inserts? David Parker <dparker@tazznetworks.com>
  2004-11-17 22:07 ` Re: sort_mem affect on inserts? Josh Berkus <josh@agliodbs.com>
  2004-11-19 14:34   ` Re: sort_mem affect on inserts? Jan Wieck <JanWieck@Yahoo.com>
@ 2004-11-19 20:25     ` Josh Berkus <josh@agliodbs.com>
  2004-11-21 14:51       ` Re: sort_mem affect on inserts? Neil Conway <neilc@samurai.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Josh Berkus @ 2004-11-19 20:25 UTC (permalink / raw)
  To: pgsql-performance; +Cc: Jan Wieck <JanWieck@Yahoo.com>; David Parker <dparker@tazznetworks.com>

Jan,

> Hmmm ... what type of foreign key lookup would that be? None of the RI
> generated queries has any order by clause.

I was under the impression that work_mem would be used for the index if there 
was an index for the RI lookup.   Wrong?

-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco



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

* Re: sort_mem affect on inserts?
  2004-11-17 21:31 sort_mem affect on inserts? David Parker <dparker@tazznetworks.com>
  2004-11-17 22:07 ` Re: sort_mem affect on inserts? Josh Berkus <josh@agliodbs.com>
  2004-11-19 14:34   ` Re: sort_mem affect on inserts? Jan Wieck <JanWieck@Yahoo.com>
  2004-11-19 20:25     ` Re: sort_mem affect on inserts? Josh Berkus <josh@agliodbs.com>
@ 2004-11-21 14:51       ` Neil Conway <neilc@samurai.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Neil Conway @ 2004-11-21 14:51 UTC (permalink / raw)
  To: josh@agliodbs.com; +Cc: pgsql-performance@postgresql.org, Jan Wieck <JanWieck@Yahoo.com>; David Parker <dparker@tazznetworks.com>

Josh Berkus wrote:
> I was under the impression that work_mem would be used for the index if there 
> was an index for the RI lookup.   Wrong?

Yes -- work_mem is not used for doing index scans, whether for RI 
lookups or otherwise.

-Neil



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


end of thread, other threads:[~2004-11-21 14:51 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-11-17 21:31 sort_mem affect on inserts? David Parker <dparker@tazznetworks.com>
2004-11-17 22:07 ` Josh Berkus <josh@agliodbs.com>
2004-11-19 14:34   ` Jan Wieck <JanWieck@Yahoo.com>
2004-11-19 20:25     ` Josh Berkus <josh@agliodbs.com>
2004-11-21 14:51       ` Neil Conway <neilc@samurai.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