問題文
A mountain cable car operator's nightly query on a status field has become slow as the table grew, and the developer must establish whether that filter is still selective before asking for anything to be changed. Which investigation does the documentation prescribe?
選択肢
- Run the query twice, once with the filter and once without, and divide the two row counts, because the ratio of the two totals is what the query optimizer itself uses and reproducing it gives the same answer the platform would reach.
- Wrap the query in the debug log's timing markers and compare the elapsed time against the previous month's run of the job.
- Run a query that counts the records grouped by that field, then compare the matching share against the threshold at which an index is used, because selectivity is a ratio.
- Add the field as an external identifier, because doing so is the documented way to learn whether the platform considers the filter selective.