X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 59B0FD1B8D1 for ; Tue, 26 Aug 2003 14:52:08 -0300 (ADT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 78176-01 for ; Tue, 26 Aug 2003 14:51:58 -0300 (ADT) Received: from news.hub.org (unknown [64.117.224.194]) by svr1.postgresql.org (Postfix) with ESMTP id 26711D1B8D0 for ; Tue, 26 Aug 2003 14:51:57 -0300 (ADT) Received: from news.hub.org (host-64-117-224-194.altec1.com [64.117.224.194] (may be forged)) by news.hub.org (8.12.9/8.12.9) with ESMTP id h7QHpuek021378 for ; Tue, 26 Aug 2003 17:51:56 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id h7QHd1bN017932 for pgsql-performance@postgresql.org; Tue, 26 Aug 2003 17:39:01 GMT From: "Bupp Phillips" X-Newsgroups: comp.databases.postgresql.performance Subject: Re: What is the fastest way to get a resultset Date: Tue, 26 Aug 2003 02:18:23 -0700 Organization: Hub.Org Networking Services Lines: 40 Message-ID: References: X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 To: pgsql-performance@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/339 X-Sequence-Number: 3155 Is this something that can be done thru a SQL statement, or are you saying that I need to develop logic to handle this because the database won't hold the resultset on the server, but instead sends it all to the client? It there a way to get server side cursors with Postgresql like SQLServer has or is this a limitation that it has? Thanks "Jeff" wrote in message news:Pine.BSF.4.44.0308251645360.15800-100000@torgo.978.org... > On Mon, 25 Aug 2003, Bupp Phillips wrote: > > > > > I have a table that has 103,000 records in it (record size is about 953 > > bytes) and when I do a select all (select * from ) it takes a > > whopping 30 secs for the data to return!! > > > > SQLServer on the other hand takes 6 secs, but you can also use what is > > called a firehose cursor, which will return the data in < 1 sec. > > > You probably want a cursor. > Typically what happens is postgres sends _all_ the data to the client - > which can be rather substantial. A cursor allows you to say "get me the > first 1000 records. now the next 1000" - it should get you the speed you > want. > > > -- > Jeff Trout > http://www.jefftrout.com/ > http://www.stuarthamm.net/ > > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org >