From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Snow <andrew(at)modulus(dot)org> |
Cc: | "Alexandr S(dot)" <say(at)infobus(dot)ru>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: the index on INTEGER field does not work (PG 7.1.2) |
Date: | 2001-06-15 14:10:45 |
Message-ID: | 24341.992614245@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Andrew Snow <andrew(at)modulus(dot)org> writes:
> Please see FAQ 4.9
While that's a good answer in general, the default statistics are set up
(with malice aforethought) to give index scans.
regression=# create table test_int(id int primary key);
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'test_int_pkey' for table 'test_int'
CREATE
regression=# explain SELECT * FROM test_int WHERE id = 33;
NOTICE: QUERY PLAN:
Index Scan using test_int_pkey on test_int (cost=0.00..8.14 rows=10 width=4)
EXPLAIN
So I'm not sure what's going on here. Alexandr, what do you get from
EXPLAIN for your queries?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | pgsql-bugs | 2001-06-15 20:51:26 | to_date() month translation |
Previous Message | Le Gourou qui fait le support | 2001-06-15 11:23:10 | pg_dumpall problem |