X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E4060475A80 for ; Tue, 15 Apr 2003 09:06:26 -0400 (EDT) Received: from mta.attla.net.ar (smtp.attla.net.ar [200.61.33.135]) by postgresql.org (Postfix) with ESMTP id 71B0A474E44 for ; Tue, 15 Apr 2003 09:06:22 -0400 (EDT) Received: from keko.com.ar ([200.61.33.190]) by mta.attla.net.ar (InterMail vK.4.03.01.00 201-232-122 license c284b6697c24beb7e22a6d41beae4243) with SMTP id <20030415130625.KAVH27891.mta@keko.com.ar> for ; Tue, 15 Apr 2003 10:06:25 -0300 From: "mdc@keko.com.ar" To: pgsql-sql@postgresql.org Subject: Re: help with query!!! X-Mailer: WebMAIL to Mail Gateway v3.0e Date: Tue, 15 Apr 2003 10:03:46 -0300 Message-id: <3e9c0332.9ac.16838@keko.com.ar> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_01,PLING_PLING version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/225 X-Sequence-Number: 12926 hi guys > numeroVia | smallint | not null > fechaHora | timestamp(3) with time zone | not null > explain delete from "Transitos" > where "codigoEstacion"=3D '02' and > "numeroVia" =3D 1 and > "fechaHora" =3D '2003-0403 17:34:06.92'::timestamp and > "medioPago" =3D 'Efectivo' and > "tipoTransito"=3D 'Normal' and > categoria=3D'01' >You're casting the constant compared to fechaHora to >timestamp, which is >the wrong thing (timestamp !=3D timestamp with timezone); and >you're not >casting the constant compared to numeroVia to smallint. >Each of these >type mismatches will prevent an indexscan. ok , first thanks a lot for your responses, well not my are doing this wrong castings, they are from ODBC driver , my analisys was from server side, i mean, this information is send from my aplication via ODBC to postmaster . For research propouses start the postmaster with debug level 3 and later ,recreate this queries with additional explain clauses for analisis, the ::timestamp in syntax not in my own code ok ? . well questions i plan to change this castings , modifing the database definition numeroVia smallint -> to int4 fechaHora timeStamp(3) with timezone -> timeStamp(3) * * milliseconds are very important to me, the aplication register events at real time and millisecond are difference into 2 events , application is multithread . last question, is posible to make this changes whitout download the database at all ? , the alter table ..... do it? Tia MDC pd: Sorry for my english , again ;) --------------------------------------- =BFTodav=EDa no naveg=E1s con Keko? Hac=E9 click aqu=ED: http://www.keko.com.ar