└─TableReader_25 600 13.3ms └─Limit_24 704 └─Selection_23 704 └─TableRangeScan_22 704 table:user_present 実行時間の短縮に成功! Explain Analyze の結果(一部抜粋) select * from user_present where user_id = ? and not received and delete_time = ? order by ulid desc limit 100 offset 500;
└─TableReader_20 100 4.09ms └─Limit_19 100 └─Selection_18 100 └─TableRangeScan_17 100 table:user_present 検索行数が減りスキャンがより効率的に ※仕様によっては適用できない Explain Analyze の結果(一部抜粋) select * from user_present where user_id = ? and ulid < ? not received and delete_time = ? order by ulid desc limit 100;