From: | "Vilson farias" <vilson(dot)farias(at)digitro(dot)com(dot)br> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | indexes not working very well |
Date: | 2001-03-23 18:36:41 |
Message-ID: | 006f01c0b3c8$340ef340$98a0a8c0@dti.digitro.com.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Greetings,
I have a little problem here and need some help. I created a table where
indexes are not working very well here. Please take a look at the code below
(it's easier).
Two databases with same problem : 7.0.2 and 7.0.3 both on linux redhat
6.2.
Am I doing something wrong?
bxs=#
bxs=# CREATE TABLE hora_minuto(
bxs(# hora char(5),
bxs(# hora_minuto TIME,
bxs(# CONSTRAINT XPKhora_minuto PRIMARY KEY (hora, hora_minuto)
bxs(# )
bxs-# ;
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index
'xpkhora_minuto' for table 'hora_minuto'
CREATE
bxs=#
bxs=#
bxs=# \d hora_minuto
Table "hora_minuto"
Attribute | Type | Modifier
-------------+---------+----------
hora | char(5) | not null
hora_minuto | time | not null
Index: xpkhora_minuto
bxs=#
bxs-#
bxs-#
bxs-#
bxs-#
bxs-# INSERT INTO hora_minuto VALUES( '', '13:38:00');
ERROR: parser: parse error at or near "]"
bxs=# INSERT INTO hora_minuto VALUES( '', '13:39:00');
INSERT 2675143 1
bxs=# INSERT INTO hora_minuto VALUES( '', '13:40:00');
INSERT 2675144 1
bxs=# INSERT INTO hora_minuto VALUES( '', '13:41:00');
INSERT 2675145 1
bxs=# INSERT INTO hora_minuto VALUES( '', '13:42:00');
INSERT 2675146 1
bxs=# INSERT INTO hora_minuto VALUES( '', '13:43:00');
INSERT 2675147 1
bxs=# INSERT INTO hora_minuto VALUES( '', '13:44:00');
INSERT 2675148 1
bxs=# INSERT INTO hora_minuto VALUES( '', '13:45:00');
INSERT 2675149 1
bxs=# INSERT INTO hora_minuto VALUES( '', '13:46:00');
INSERT 2675150 1
bxs=#
bxs=#
bxs=#
bxs=#
bxs=#
bxs=#
bxs=# EXPLAIN SELECT hora_minuto FROM hora_minuto WHERE hora_minuto >
'13:43:00';
NOTICE: QUERY PLAN:
Seq Scan on hora_minuto (cost=0.00..22.50 rows=333 width=8)
EXPLAIN
bxs=#
bxs=#
bxs=#
Regards,
José Vilson de Mello de Farias
Dígitro Tecnologia Ltda.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fork | 2001-03-23 18:57:11 | Re: internationalizing text |
Previous Message | Limin Liu | 2001-03-23 18:30:29 | Re: [HACKERS] SPI example does not work for 7.1beta4 |