Questions tagged «database-scan»

4
PostgreSQL为什么对索引列执行顺序扫描?
非常简单的示例-一个表,一个索引,一个查询: CREATE TABLE book ( id bigserial NOT NULL, "year" integer, -- other columns... ); CREATE INDEX book_year_idx ON book (year) EXPLAIN SELECT * FROM book b WHERE b.year > 2009 给我: Seq Scan on book b (cost=0.00..25663.80 rows=105425 width=622) Filter: (year > 2009) 为什么不执行索引扫描呢?我想念什么?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.