X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 207409FA2FA for ; Thu, 25 May 2006 19:30:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 43787-05 for ; Thu, 25 May 2006 19:30:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 8F6BE9FA278 for ; Thu, 25 May 2006 19:30:37 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k4PMUYxm016780; Thu, 25 May 2006 18:30:34 -0400 (EDT) To: Jim Nasby cc: "Merlin Moncure" , "Postgresql Performance" Subject: Re: is it possible to make this faster? In-reply-to: <346F1F9F-10E6-43F7-80E4-0DE989E5D760@pervasive.com> References: <15919.1148590347@sss.pgh.pa.us> <16119.1148591497@sss.pgh.pa.us> <346F1F9F-10E6-43F7-80E4-0DE989E5D760@pervasive.com> Comments: In-reply-to Jim Nasby message dated "Thu, 25 May 2006 17:17:43 -0500" Date: Thu, 25 May 2006 18:30:34 -0400 Message-ID: <16779.1148596234@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/484 X-Sequence-Number: 19271 Jim Nasby writes: > On May 25, 2006, at 4:11 PM, Tom Lane wrote: >> Are you sure you measured that right? I tried to duplicate this using >> mysql 5.0.21, and I see runtimes of 0.45 sec without an index and >> 0.15 sec with. This compares to psql times around 0.175 sec. Doesn't >> look to me like we're hurting all that badly, even without using the >> index. > Well, that would depend greatly on how wide the rows were, and I > don't believe the OP ever mentioned that. If he's got a nice, fat > varchar(1024) in that table, then it's not surprising that an index > would help things. Wide rows might slow down the psql side of things somewhat (though probably not as much as you think). That doesn't account for the discrepancy in our mysql results though. For the record, I was testing with a table like create table t(a int, b int, c int); create index ti on t(a,b,c); regards, tom lane