X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 641EAD1B4AC for ; Tue, 30 Mar 2004 19:25:43 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 44599-07 for ; Tue, 30 Mar 2004 15:25:42 -0400 (AST) Received: from hotmail.com (bay8-f81.bay8.hotmail.com [64.4.27.81]) by svr1.postgresql.org (Postfix) with ESMTP id D0D25D1B44D for ; Tue, 30 Mar 2004 15:25:39 -0400 (AST) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 30 Mar 2004 11:25:40 -0800 Received: from 207.13.118.180 by by8fd.bay8.hotmail.msn.com with HTTP; Tue, 30 Mar 2004 19:25:40 GMT X-Originating-IP: [207.13.118.180] X-Originating-Email: [el_vigia_ec@hotmail.com] X-Sender: el_vigia_ec@hotmail.com From: "Jaime Casanova" To: pgsql-performance@postgresql.org Subject: select slow? Date: Tue, 30 Mar 2004 19:25:40 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 30 Mar 2004 19:25:40.0278 (UTC) FILETIME=[C95D3D60:01C4168C] X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/424 X-Sequence-Number: 6280 hi all, i have an amd athlon with 256 ram (i know, this is not a *real* server but my tables are small) i'm using vb6 (win98) with pgsql-7.3.4 (rh8) trough the psqlodbc. when i do a select in took long to execute, here is an example table icc_m_banco CREATE TABLE ICC_M_BANCO ( CodBanco SMALLINT NOT NULL, Descripcion CHARACTER VARYING(60) NOT NULL, RefContable NUMERIC, Estado CHAR(1) NOT NULL, FecRegistro DATE NOT NULL, CONSTRAINT EstadoBanco CHECK ((Estado = 'A') or (Estado = 'I')), PRIMARY KEY(CodBanco) ); select * from icc_m_banco where codbanco = 1; it tooks 13s from it's send until it's executed. explain analyze give me this result: explain analyze select * from icc_m_banco where codbanco = 1; Seq Scan on icc_m_banco (cost=0.00..1.06 rows=6 width=41) (actual time=7.94..7.96 rows=4 loops=1) Total runtime: 63.37 msec (2 rows) so i think its not a database problem (at least it's not all the problem), though it seems to me it is taking a lot of time executing this. am i right? any suggestions? _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail