Queries run on my event based database currently scan all rows even if a certain event is filtered - leading to long scan times. Event_type is something that I would use often in filters which is why I think it might be a good thing to cluster on. The table is already clustered by date_id and app_title. I used the SYSTEM$CLUSTERING_INFORMATION to see if clustering on the additional event_type column would be useful.The results were bad. Does this mean that this would be a bad choice? Or does it just mean that the current table is poorly clustered on this key? Would creating a table with these three cluster keys lead to different results?
(I changed some names and values in the query/results below)
select system$clustering_information('materialized_view', '(date_id, app_title, event_type)');
{
"cluster_by_keys" : "LINEAR(date_id, app_title, event_type)",
"total_partition_count" : <more than 100k>,
"total_constant_partition_count" : 0,
"average_overlaps" : ~500
"average_depth" : ~500,
"partition_depth_histogram" : {
"00000" : 0,
"00001" : 0,
"00002" : 0,
"00003" : 0,
"00004" : 0,
"00005" : 0,
"00006" : 0,
"00007" : 0,
"00008" : 0,
"00009" : 0,
"00010" : 0,
"00011" : 0,
"00012" : 0,
"00013" : 0,
"00014" : 0,
"00015" : 0,
"00016" : 0,
"00064" : 30,
"00128" : 3218,
"00256" : 22146,
"00512" : 94367,
"01024" : 134114
}
}