我正在尝试对具有500万个数据的表进行不同的选择,这大约需要2分钟。我的目的是将速度提高到几秒钟。
查询:-从t_fin_do中选择不同的帐户类型,其中country_id ='abc'
您可以尝试使用以下方法为此查询创建部分覆盖索引:
create index on t_fin_do(country_id, accounttype) where country_id='abc';
取决于country_id的选择性,可能比表顺序扫描更快。
country_id