dbTalk Databases Forums  

[BUGS] BUG #1408: don't see index

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1408: don't see index in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
andrzej
 
Posts: n/a

Default [BUGS] BUG #1408: don't see index - 01-20-2005 , 01:10 PM







The following bug has been logged online:

Bug reference: 1408
Logged by: andrzej
Email address: wppl16 (AT) wp (DOT) pl
PostgreSQL version: 8.0.0-rc5
Operating system: windows XP
Description: don't see index
Details:

Create table t1
(
v varchar(5) not null,
m varchar(20),
d date,
l varchar(10),
primary key(v)
);

explain select * from t1 where v='abc'
result:
Seq Scan on t1 (....
Filter(v)::text='abc'::text)
DON'T SEE INDEX PKEY ???????!!!!

but Postgres 7.4.2 Linux
explain select * from t1 where v='abc'
result:
Index Scan using t1_pkey on t1(...
Index Cond((v)::text='abc'::text)
SEE INDEX PKEY OK !!!!!

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply With Quote
  #2  
Old   
Bruno Wolff III
 
Posts: n/a

Default Re: [BUGS] BUG #1408: don't see index - 01-20-2005 , 02:18 PM






On Tue, Jan 18, 2005 at 09:01:29 +0000,
andrzej <wppl16 (AT) wp (DOT) pl> wrote:
Quote:
The following bug has been logged online:

Bug reference: 1408
Logged by: andrzej
Email address: wppl16 (AT) wp (DOT) pl
PostgreSQL version: 8.0.0-rc5
Operating system: windows XP
Description: don't see index
Details:

Create table t1
(
v varchar(5) not null,
m varchar(20),
d date,
l varchar(10),
primary key(v)
);

explain select * from t1 where v='abc'
result:
Seq Scan on t1 (....
Filter(v)::text='abc'::text)
DON'T SEE INDEX PKEY ???????!!!!

but Postgres 7.4.2 Linux
explain select * from t1 where v='abc'
result:
Index Scan using t1_pkey on t1(...
Index Cond((v)::text='abc'::text)
SEE INDEX PKEY OK !!!!!
This probably isn't a bug. In some circumstances a sequential scan is faster
than an index scan.

How many rows are in this table?
Have you run an ANALYZE on the table?

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.