pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tv@fuzzy.cz
To: Samuel Gendler <sgendler@ideasculptor.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Query Performance SQL Server vs. Postgresql
Date: Mon, 22 Nov 2010 13:22:43 +0100
Message-ID: <fe8b9f344e9575056f79658e6c639d4d.squirrel@sq.gransy.com> (raw)
In-Reply-To: <AANLkTikmShzkt_OZ4S0=YDjwZV6_OJyG7EXst_qP4k8F@mail.gmail.com>
References: <COL115-W5250BF8BDC50E0A64DABE4A8360@phx.gbl>
	<AANLkTin+MPhrYUzkCZjdAMLhF3KKZCCuvDm0=Npf9jz7@mail.gmail.com>
	<COL115-W3987D9D7DE908C5C47792DA8380@phx.gbl>
	<AANLkTi=yFV69yNZpHzKiZRtZ0X0PtKcpOrMNNkAo+Si6@mail.gmail.com>
	<COL115-W186A7B93051E6907958ED6A8380@phx.gbl>
	<AANLkTinQmaQ5Ui-vQwfqWFtOTCj76NWFBr6VDKMdVUCs@mail.gmail.com>
	<COL115-W6193714B75A26E58EA773AA83C0@phx.gbl>
	<3ba1d0462bc7df1c3eb5a6d4777ce08a.squirrel@sq.gransy.com>
	<22586.1290359761@sss.pgh.pa.us>
	<F70A4A8C-A76B-4139-9D24-346A1DCB2CAF@gmail.com>
	<COL115-W422C281502B5C2F62AE90AA83D0@phx.gbl>
	<AANLkTikmShzkt_OZ4S0=YDjwZV6_OJyG7EXst_qP4k8F@mail.gmail.com>

> I believe you can set work_mem to a different value just for the duration
> of
> a single query, so you needn't have work_mem set so high if for every
> query
> on the system.  A single query may well use a multiple of work_mem, so you
> really probably don't want it that high all the time unless all of your
> queries are structured similarly.  Just set work_mem='2047MB'; query;
> reset
> all;

Yes, executing "set work_mem='64MB'" right before the query should be just
fine. Setting work_mem to 2GB is an overkill most of the time (99.99999%).

Tomas




view thread (28+ messages)  latest in thread

Message-ID: <fe8b9f344e9575056f79658e6c639d4d.squirrel@sq.gransy.com>
Permalink:  ../fe8b9f344e9575056f79658e6c639d4d.squirrel@sq.gransy.com/
Also on:    postgresql.org/message-id/fe8b9f344e9575056f79658e6c639d4d.squirrel@sq.gransy.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: tv@fuzzy.cz, sgendler@ideasculptor.com
  Subject: Re: Query Performance SQL Server vs. Postgresql
  In-Reply-To: <fe8b9f344e9575056f79658e6c639d4d.squirrel@sq.gransy.com>
  References: <COL115-W5250BF8BDC50E0A64DABE4A8360@phx.gbl> <AANLkTin+MPhrYUzkCZjdAMLhF3KKZCCuvDm0=Npf9jz7@mail.gmail.com> <COL115-W3987D9D7DE908C5C47792DA8380@phx.gbl> <AANLkTi=yFV69yNZpHzKiZRtZ0X0PtKcpOrMNNkAo+Si6@mail.gmail.com> <COL115-W186A7B93051E6907958ED6A8380@phx.gbl> <AANLkTinQmaQ5Ui-vQwfqWFtOTCj76NWFBr6VDKMdVUCs@mail.gmail.com> <COL115-W6193714B75A26E58EA773AA83C0@phx.gbl> <3ba1d0462bc7df1c3eb5a6d4777ce08a.squirrel@sq.gransy.com> <22586.1290359761@sss.pgh.pa.us> <F70A4A8C-A76B-4139-9D24-346A1DCB2CAF@gmail.com> <COL115-W422C281502B5C2F62AE90AA83D0@phx.gbl> <AANLkTikmShzkt_OZ4S0=YDjwZV6_OJyG7EXst_qP4k8F@mail.gmail.com> <fe8b9f344e9575056f79658e6c639d4d.squirrel@sq.gransy.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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