Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D28EE2E17F6 for ; Thu, 13 Mar 2008 20:04:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 11882-05 for ; Thu, 13 Mar 2008 20:04:42 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from qb-out-0506.google.com (qb-out-0506.google.com [72.14.204.233]) by postgresql.org (Postfix) with ESMTP id BD34B2E037A for ; Thu, 13 Mar 2008 20:04:42 -0300 (ADT) Received: by qb-out-0506.google.com with SMTP id o12so3121992qba.17 for ; Thu, 13 Mar 2008 16:04:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; bh=PZqf/cY5mBu/rliybBCkxGT4z4GUyA5Qz7SvSRao+nQ=; b=usxikms1ZGlCYnHyTWQGLhnIxXh9YlCYswc2JvMZ6OcUY9ZnL+507zm1HNbMjXyKn57bN3yTrwXFz5puvHcNdmH2WgAKmj0wABQvvzQFhVhEihcMaQb+OXrvg6azlzzFemi6A09TYicHqt0Zc74b67MXwYw0VvdkHUvG197xjS8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=GzdWi1hSj5wx2gwPCv1NnMmd820kaXtiMxQYFrtwm29CedMwXQtKR98J5AJE+wuVrY9qryoaXUVeElB/k85/S52L61Ln45umjsY7hUs108oZ7h4ubk6EScXaMYa9hbBgU31yoAkNGX4WdH12653AqpoxSxxHuFiuxvNRJKk2XD8= Received: by 10.35.10.13 with SMTP id n13mr16731845pyi.27.1205449479078; Thu, 13 Mar 2008 16:04:39 -0700 (PDT) Received: by 10.70.89.12 with HTTP; Thu, 13 Mar 2008 16:04:39 -0700 (PDT) Message-ID: Date: Thu, 13 Mar 2008 18:04:39 -0500 From: "Aaron Bono" To: "chester c young" Subject: Re: cursors and sessions Cc: "sql pgsql" In-Reply-To: <105895.21197.qm@web54303.mail.re2.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_21101_7277736.1205449479047" References: <105895.21197.qm@web54303.mail.re2.yahoo.com> X-Google-Sender-Auth: 107e54f89f85b4c9 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.452 tagged_above=0 required=5 tests=AWL=0.451, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200803/79 X-Sequence-Number: 30407 ------=_Part_21101_7277736.1205449479047 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Thu, Mar 13, 2008 at 5:54 PM, chester c young wrote: > is there any way to share a cursor between sessions? > > I have a costly query whose records need to be visited by in order by n > number of concurrent sessions, and am unable to find the best way of > doing this. > > I'd almost like to write a daemon that hands out the next record, but > that's a royal pain to set up and maintain. > > Why not pump your data into a table that mirrors the cursor and then create a function that pops items off the top of this queuing table as needed by the different sessions? -- ================================================================== Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com http://codeelixir.com ================================================================== ------=_Part_21101_7277736.1205449479047 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Thu, Mar 13, 2008 at 5:54 PM, chester c young <chestercyoung@yahoo.com> wrote:
is there any way to share a cursor between sessions?

I have a costly query whose records need to be visited by in order by n
number of concurrent sessions, and am unable to find the best way of
doing this.

I'd almost like to write a daemon that hands out the next record, but
that's a royal pain to set up and maintain.


Why not pump your data into a table that mirrors the cursor and then create a function that pops items off the top of this queuing table as needed by the different sessions?

--
==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.com
http://codeelixir.com
================================================================== ------=_Part_21101_7277736.1205449479047--