Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Challenge: Diagnosing a Slow Payment Query | Real-World Query Optimization Scenarios
Mastering SQL EXPLAIN and Query Planning
セクション 3.  4
single

single

bookChallenge: Diagnosing a Slow Payment Query

メニューを表示するにはスワイプしてください

タスク

スワイプしてコーディングを開始

You are asked to diagnose and optimize a slow query that retrieves payment records for paid rides, joining the payments and riders tables. Use the EXPLAIN output to identify the bottleneck and optimize the query for better performance.

  • Analyze the query using EXPLAIN to observe the current execution plan.
  • Identify the cause of the slow performance, focusing on sequential scans or inefficient joins.
  • Add an index to the payments table to improve filtering and ordering by status and payment_time.
  • Verify the optimization by running EXPLAIN on the query again.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 3.  4
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt