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 7883ED1B9BE for ; Thu, 4 Sep 2003 16:55:07 +0000 (GMT) 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 55701-05 for ; Thu, 4 Sep 2003 13:54:57 -0300 (ADT) Received: from news.hub.org (unknown [64.117.224.194]) by svr1.postgresql.org (Postfix) with ESMTP id A605CD1B8C6 for ; Thu, 4 Sep 2003 13:54:56 -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 h84GsuDf009752 for ; Thu, 4 Sep 2003 16:54:56 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id h84GqFL7009131 for pgsql-performance@postgresql.org; Thu, 4 Sep 2003 16:52:15 GMT From: "Relaxin" X-Newsgroups: comp.databases.postgresql.performance Subject: Re: SELECT's take a long time compared to other DBMS Date: Thu, 4 Sep 2003 09:52:29 -0700 Organization: Hub.Org Networking Services Lines: 84 Message-ID: References: <1062673303.5200.135.camel@fuji.krosing.net> <1062693009.6174.21.camel@fuji.krosing.net> 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: 200309/65 X-Sequence-Number: 3431 I had these same issues with the PeerDirect version also. "Hannu Krosing" wrote in message news:1062693009.6174.21.camel@fuji.krosing.net... > Relaxin kirjutas N, 04.09.2003 kell 17:35: > > So after you did that, where able to position to ANY record within the > > resultset? > > > > Ex. Position 100,000; then to Position 5; then to position 50,000, etc... > > not in the case of : > time psql test100k -c 'select * from test' > /dev/null > as the whole result would be written to dev null (i.e discarded) > > Yes in case of python: after doing > > res = con.query('select * from test') # 3 sec - perform query > list = res.getresult() # 1 sec - construct list of tuples > > the whole 128k records are in a python list , > so that i can immediately access any record by python list syntax, > ie list[5], list[50000] etc. > > > If you are able to do that and have your positioned row available to you > > immediately, then I'll believe that it's the ODBC driver. > > It can also be the Cygwin port, which is known to have several problems, > and if you run both your client and server on the same machine, then it > can also be an interaction of the two processes (cygwin/pgsql server and > native win32 ODBC client) not playing together very well. > > > "Hannu Krosing" wrote in message > > news:1062673303.5200.135.camel@fuji.krosing.net... > > > Relaxin kirjutas N, 04.09.2003 kell 03:28: > > > > I have a table with 102,384 records in it, each record is 934 bytes. > > > > > > I created a test database on my Linux (RH9) laptop with 30GB/4200RPM ide > > > drive and P3-1133Mhz, 768MB, populated it with 128000 rows of 930 bytes > > > each and did > > > > > > [hannu@fuji hannu]$ time psql test100k -c 'select * from test' > > > > /dev/null > > > > > > real 0m3.970s > > > user 0m0.980s > > > sys 0m0.570s > > > > > > so it seems definitely not a problem with postgres as such, but perhaps > > > with Cygwin and/or ODBC driver > > > > > > I also ran the same query using the "standard" pg adapter: > > > > > > >>> import pg, time > > > >>> > > > >>> con = pg.connect('test100k') > > > >>> > > > >>> def getall(): > > > ... t1 = time.time() > > > ... res = con.query('select * from test') > > > ... t2 = time.time() > > > ... list = res.getresult() > > > ... t3 = time.time() > > > ... print t2 - t1, t3-t2 > > > ... > > > >>> getall() > > > 3.27637195587 1.10105705261 > > > >>> getall() > > > 3.07413101196 0.996125936508 > > > >>> getall() > > > 3.03377199173 1.07322502136 > > > > > > which gave similar results > ------------------- > Hannu > > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend >