Received: from txino.mikasa.eh (170-ZARA-X31.libre.retevision.es [62.82.236.170]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f360h2814225 for ; Thu, 5 Apr 2001 20:43:03 -0400 (EDT) (envelope-from txino@wanadoo.es) Received: by txino.mikasa.eh (Postfix, from userid 502) id 00CBB75CE1; Fri, 6 Apr 2001 02:36:26 +0200 (CEST) From: "J.Fernando Moyano" Date: Fri, 6 Apr 2001 02:36:26 +0200 X-Mailer: KMail [version 1.1.99] Content-Type: text/plain; charset="iso-8859-1" To: Tom Lane References: <01040204440001.01615@txino.mikasa.eh> <01040501053805.01679@txino.mikasa.eh> <14453.986436612@sss.pgh.pa.us> In-Reply-To: <14453.986436612@sss.pgh.pa.us> Subject: Re: very very slow ..... Cc: pgsql-sql@postgresql.org MIME-Version: 1.0 Message-Id: <01040602362600.01608@txino.mikasa.eh> Content-Transfer-Encoding: 8bit X-Archive-Number: 200104/91 X-Sequence-Number: 2431 El Jueves 05 Abril 2001 04:10, escribiste: > > You would probably have better luck if you cast the date restriction > as a range, for example > > where fecha_factura >= '2001-03-01' > and fecha_factura < '2001-04-01' True !!!! It runs 10 times faster !!!!!!! You are a genius !!!! ;-)) Thanks !! -- Fernando Moyano Frase del día: -------------- Yo antes era vanidoso, pero me cure, y ahora soy perfecto! O:-) (*) SymeX ==> http://symex.lantik.com (*) WDBIL ==> http://wdbil.sourceforge.net (*) Informate sobre LINUX en http://www.linux.org