pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Merlin Moncure <mmoncure@gmail.com>
To: Rohit_Behl <Rohit_Behl@infosys.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Jdbc/postgres performance
Date: Tue, 17 Oct 2006 16:28:49 -0400
Message-ID: <b42b73150610171328r508ab94dmd70dac6ed78474aa@mail.gmail.com> (raw)
In-Reply-To: <407937EC76157D439EB0C9F9B6047EFD40017C@BLRKECMSG04.ad.infosys.com>
References: <407937EC76157D439EB0C9F9B6047EFD40017C@BLRKECMSG04.ad.infosys.com>

On 10/17/06, Rohit_Behl <Rohit_Behl@infosys.com> wrote:
> Select events.event_id, ctrl.real_name, events.tsds, events.value, events.lds, events.correction, ctrl.type, ctrl.freq from table events, iso_midw_control ctrl where events.obj_id = ctrl.obj_id and events.event_id > ?::bigint order by events.event_id limit ?

unfortunately parameterized limit statements cause problems due to the
fact the planner has a hard coded 'guess' of 10% of rows returned when
the plan is generated.  I mention this everyime query hints proposal
comes up :-).

best you can do is to try turning off seqscan and possibly bitmap scan
when the plan is generated.

merlin



view thread (12+ messages)  latest in thread

Message-ID: <b42b73150610171328r508ab94dmd70dac6ed78474aa@mail.gmail.com>
Permalink:  ../b42b73150610171328r508ab94dmd70dac6ed78474aa@mail.gmail.com/
Also on:    postgresql.org/message-id/b42b73150610171328r508ab94dmd70dac6ed78474aa@mail.gmail.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: mmoncure@gmail.com, Rohit_Behl@infosys.com
  Subject: Re: Jdbc/postgres performance
  In-Reply-To: <b42b73150610171328r508ab94dmd70dac6ed78474aa@mail.gmail.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