假设我有一个表,其描述如下:
create table my_table (
id serial,
create_date timestamp with time zone default now(),
data text
);
和类似的查询:
select * from my_table
where create_date >= timestamp with time zone 'yesterday'
理论上哪个索引会更快,为什么?
create index index_a on my_table (create_date);
create index index_b on my_table (create_date DESC);