Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id E73FB1AEBA96 for ; Tue, 24 Jan 2012 16:41:56 -0400 (AST) Received: from mail.prospectiv.com ([155.212.59.212] helo=stan.prospectivdirect.com) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1RpnBi-0003jE-Fi for pgsql-performance@postgresql.org; Tue, 24 Jan 2012 20:41:56 +0000 Received: (qmail 24696 invoked from network); 24 Jan 2012 20:41:40 -0000 Received: from unknown (HELO ?192.168.1.15?) (192.168.1.15) by 0 with SMTP; 24 Jan 2012 20:41:40 -0000 Subject: Cursor fetch performance issue From: Tony Capobianco To: pgsql-performance@postgresql.org Content-Type: text/plain; charset="UTF-8" Date: Tue, 24 Jan 2012 15:41:40 -0500 Message-ID: <1327437700.1968.10.camel@tony1.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 (2.32.3-1.fc14) Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201201/59 X-Sequence-Number: 46072 We are migrating our Oracle warehouse to Postgres 9. This function responds well: pg=# select public.getMemberAdminPrevious_sp2(247815829, 1,'test.email@hotmail.com', 'email', 'test'); getmemberadminprevious_sp2 ---------------------------- (1 row) Time: 7.549 ms However, when testing, this fetch takes upwards of 38 minutes: BEGIN; select public.getMemberAdminPrevious_sp2(247815829, 1,'test.email@hotmail.com', 'email', 'test'); FETCH ALL IN ""; How can I diagnose any performance issues with the fetch in the cursor? Thanks. Tony