From: | "Vilson farias" <vilson(dot)farias(at)digitro(dot)com(dot)br> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | sequencial scans |
Date: | 2001-07-04 19:05:17 |
Message-ID: | 004501c104bc$45608240$98a0a8c0@dti.digitro.com.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Greetings,
With short words (time is money and my english is very bad), why sequencial scans in the example below ?
persona=# CREATE TABLE teste_erro(
persona(# cod integer,
persona(# CONSTRAINT XPKteste_erro PRIMARY KEY(cod));
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'xpkteste_erro' for table 'teste_erro'
CREATE
persona=# CREATE FUNCTION teste_proc(VARCHAR, VARCHAR) RETURNS integer AS '
persona'# DECLARE
persona'# numeroa ALIAS for $1;
persona'# dddlocal ALIAS for $2;
persona'# BEGIN
persona'# RETURN 666;
persona'# END;
persona'# ' LANGUAGE 'plpgsql';
CREATE
persona=# explain select * from teste_erro where cod = teste_proc('3138414411','19');
NOTICE: QUERY PLAN:
Seq Scan on teste_erro (cost=0.00..25.00 rows=10 width=4)
EXPLAIN
persona=#explain select * from teste_erro where cod = 313;
NOTICE: QUERY PLAN:
Index Scan using xpkteste_erro on teste_erro (cost=0.00..8.14 rows=10 width=4)
EXPLAIN
Regards,
José Vilson de Mello de Farias
Dígitro Tecnologia Ltda - Brazil
From | Date | Subject | |
---|---|---|---|
Next Message | Allan Engelhardt | 2001-07-04 19:16:14 | Re: query optimizer questions |
Previous Message | Michael Williams | 2001-07-04 18:50:50 | OpenLink Product Support for PostGreSql discontinued |