#261 auto detect index scans to fix perf problem with partitions