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 E65E19FA16E for ; Fri, 26 May 2006 01:47:45 -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 35445-08 for ; Fri, 26 May 2006 01:47:36 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.204]) by postgresql.org (Postfix) with ESMTP id 56AE49F9EEB for ; Fri, 26 May 2006 01:47:36 -0300 (ADT) Received: by nz-out-0102.google.com with SMTP id 18so1977919nzp for ; Thu, 25 May 2006 21:47:35 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Rlz6+sR+bmmvyuacgl3C6pixluAflKi5x0fST3BtiMb2uhh1mYndqN/AgotPNyziXLX3fYVIXfHYh5Z8Tap0TrLhJlE/TcEFzn699hFnc+piXqLE1ZvZEmoFRisFpvOnIqBPBA2oMBB7Y3zKrJLbSNcILpA8tRNKIMhoX6mbiuI= Received: by 10.64.114.10 with SMTP id m10mr1358754qbc; Thu, 25 May 2006 21:47:35 -0700 (PDT) Received: by 10.65.137.19 with HTTP; Thu, 25 May 2006 21:47:35 -0700 (PDT) Message-ID: Date: Fri, 26 May 2006 00:47:35 -0400 From: "Merlin Moncure" To: "Postgresql Performance" Subject: Re: is it possible to make this faster? In-Reply-To: <16119.1148591497@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <15919.1148590347@sss.pgh.pa.us> <16119.1148591497@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/489 X-Sequence-Number: 19276 On 5/25/06, Tom Lane wrote: > Tom Lane writes: > > "Merlin Moncure" writes: > >> recent versions of mysql do much better, returning same set in < 20ms. > 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, my numbers were approximate, but I tested on a few different machines. the times got closer as the cpu speed got faster. pg really loves a quick cpu. on 600 mhz p3 I got 70ms on mysql and 1050ms on pg. Mysql query cache is always off for my performance testing. My a and b columns were ID columns from another table, so I rewrote the join and now pg is smoking mysql (again). To quickly answer the other questions: 1. no, not testing innodb 2, rows are narrow Merlin