select USEC_TO_TIME(request_time),QUERY_SQL from sql_audit PARTITION(p20240809)
where QUERY_SQL like ‘%amm%’ and request_time > time_to_usec(now() - interval 14 hour) order by request_time asc
select count(*) from sql_audit PARTITION(p20240809)
数据量大概几个亿。
看看这个表对应的内部表,以及上面的索引,尽可能加上对应的条件。如 tenant_id=xxxx and svr_ip in ('xx.xx.xx.xx') and rquest_type in (1,2,3)
此外就是加 hint /*+ read_consistency(weak) parallel(16) */