> > Nope, the query is way too expensive to run it twice. (GIN
> scan over
> > well over half a million rows. It's faster to do the
> > get-as-cursor-then-loop-and-increment, I've measured that)
>
> Can't you select into a temporary table and then do select
> count(*) over that table, aswell a
> Nope, the query is way too expensive to run it twice. (GIN scan over
> well over half a million rows. It's faster to do the
> get-as-cursor-then-loop-and-increment, I've measured that)
Can't you select into a temporary table and then do select count(*)
over that table, aswell as run your cursor
> > > I can deal with materializing the resultset, but I want
> to get away
> > > from the loop-a-thousand-times-doing-plus-one...
> >
> > i dont think its possible. note that you can make a
> refcursor inside
> > your plpgsql function and pass it to an sql function which
> can do sql
> > cu
On 11/3/06, Richard Troy <[EMAIL PROTECTED]> wrote:
On Fri, 3 Nov 2006, Merlin Moncure wrote:
> >
> > I can deal with materializing the resultset, but I want to get away from
> > the loop-a-thousand-times-doing-plus-one...
>
> i dont think its possible. note that you can make a refcursor inside
On Fri, 3 Nov 2006, Merlin Moncure wrote:
> >
> > I can deal with materializing the resultset, but I want to get away from
> > the loop-a-thousand-times-doing-plus-one...
>
> i dont think its possible. note that you can make a refcursor inside
> your plpgsql function and pass it to an sql function
On 11/3/06, Magnus Hagander <[EMAIL PROTECTED]> wrote:
> > Is there any way to count how many hits I got in a cursor
> in PL/pgsql?
> >
> > I have a function that will "window" through the result of
> a (large)
> > query based on two parameters, but I also want to return
> the number of
> > hits
> > Is there any way to count how many hits I got in a cursor
> in PL/pgsql?
> >
> > I have a function that will "window" through the result of
> a (large)
> > query based on two parameters, but I also want to return
> the number of
> > hits to the client. Right now I'm looping through the e
On Thu, Nov 02, 2006 at 10:43:58PM +0100, Magnus Hagander wrote:
> Is there any way to count how many hits I got in a cursor in PL/pgsql?
>
> I have a function that will "window" through the result of a (large)
> query based on two parameters, but I also want to return the number of
> hits to the
Magnus Hagander wrote:
Is there any way to count how many hits I got in a cursor in PL/pgsql?
I have a function that will "window" through the result of a (large)
query based on two parameters, but I also want to return the number of
hits to the client. Right now I'm looping through the entire
Is there any way to count how many hits I got in a cursor in PL/pgsql?
I have a function that will "window" through the result of a (large)
query based on two parameters, but I also want to return the number of
hits to the client. Right now I'm looping through the entire cursor and
incrementing a
10 matches
Mail list logo