Skip site navigation (1) Skip section navigation (2)

Re: Issue with PQdescribePortal to describe a select cursor

From: "Brijesh Shrivastav" <Bshrivastav(at)esri(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: Issue with PQdescribePortal to describe a select cursor
Date: 2007-08-28 18:45:23
Message-ID: 5774D66D5EC83645A99B3A905527BB7102933EE7@zipwire.esri.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
> 
> "Brijesh Shrivastav" <Bshrivastav(at)esri(dot)com> writes:
> > My problem in executing a portal before I can describe is the way
> > our client api interface is defined. Typically user sends us a query
> > that we prepare and describe before sending the describe output
> > back to the client. In next step user provides us with any input
> > parameter data for the sql and ask us to execute the query. This
> > system works well with PQprepare/PQdescribePrepared but doesn't
> > give me the advantage of a portal. One option that will have a
> > performance penalty will be to prepare the statement 
> without creating
> > a portal during initial query so I can send describe results back
> > to the client and only create the portal during the execute. I will
> > pay the cost of preparing query twice though I can set LIMIT to 0
> > for the initial query to possibly reduce the prepare time.
> 
> You seem to be confusing preparing a query with executing it.  LIMIT 0
> isn't going to save any prepare time.

That is true, LIMIT 0 won't help me here. I was just trying to think of some 
way where I can force a simple plan that takes less time to prepare since I am
going to disregard that plan in any case.

Brijesh

In response to

pgsql-interfaces by date

Next:From: Korumilli, Bala S (GE Healthcare)Date: 2007-08-29 06:59:52
Subject: Problem with character encodings.
Previous:From: Tom LaneDate: 2007-08-28 18:24:23
Subject: Re: Issue with PQdescribePortal to describe a select cursor

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group