X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4221ED9F7F for ; Wed, 26 Oct 2005 20:47:31 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 41141-08 for ; Wed, 26 Oct 2005 23:47:27 +0000 (GMT) Received: from hotmail.com (bay23-f3.bay23.hotmail.com [64.4.22.53]) by svr1.postgresql.org (Postfix) with ESMTP id D9623D8640 for ; Wed, 26 Oct 2005 20:47:28 -0300 (ADT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 26 Oct 2005 16:47:32 -0700 Message-ID: Received: from 196.40.18.42 by by23fd.bay23.hotmail.msn.com with HTTP; Wed, 26 Oct 2005 23:47:31 GMT X-Originating-IP: [196.40.18.42] X-Originating-Email: [sidarlopez@hotmail.com] X-Sender: sidarlopez@hotmail.com From: =?iso-8859-1?B?U2lkYXIgTPNwZXogQ3J1eg==?= To: pgsql-performance@postgresql.org Subject: performance on query Date: Wed, 26 Oct 2005 17:47:31 -0600 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed X-OriginalArrivalTime: 26 Oct 2005 23:47:32.0305 (UTC) FILETIME=[A1FC8C10:01C5DA87] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.326 required=5 tests=[AWL=-0.424, DNS_FROM_RFC_ABUSE=0.374, DNS_FROM_RFC_POST=1.376, MSGID_FROM_MTA_HEADER=0] X-Spam-Level: * X-Archive-Number: 200510/403 X-Sequence-Number: 15171 I DON'T KNOW WHAT TO DO WITH THIS QUERYS... Comparation with sql server, sql server wins !!! Table sizes: archivos: 40MB fotos: 55MB select count(1) from fotos f where not exists (select a.archivo from archivos a where a.archivo=f.archivo) 173713 ms. 110217 ms. 83122 ms. select count(*) from ( select archivo from fotos except select archivo from archivos ) x; 201479 ms. SELECT count(*) FROM fotos f LEFT JOIN archivos a USING(archivo) WHERE a.archivo IS NULL 199523 ms. _________________________________________________________________ MSN Amor: busca tu ½ naranja http://latam.msn.com/amor/