|
|
请教:
select count(*) from TABLE1 where f1<999 and f2='xxx' and f3=10
and (f4 in (150003,150004,150006,150010,150011,150012,150013,150014,150015,
150016,150017,150018,150019,150020,150021,150022,150023,150024,150025,150026,
150027,150028,150029,150030,150031,150032,150033,150034,150035,150036,150037,
150038,150039,150040,150041,150042))
and to_char(f5,’yyyymmdd hh24:mi’)>='20030121 00:00' and to_char(f6,’yyyymmdd hh24:mi’)<='20030127 23:59';
类似这样的一批sql语句,表的记录数是千万级的。where条件包括f1,f2,f3,f4,f5,f6的全部组合,也可能是中间某几个字段的组合,应该如何建索引?
谢谢。 |
|