Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Improving Rider Search Performance | Real-World Query Optimization Scenarios
Mastering SQL EXPLAIN and Query Planning

bookChallenge: Improving Rider Search Performance

In many real-world ride-sharing applications, searching for riders based on their location and ride history is a frequent and performance-critical operation. As you have seen in previous chapters, using EXPLAIN helps you analyze how efficiently a query runs and highlights opportunities for optimization. Now you will apply your skills to a practical scenario involving the riders and rides tables, focusing on improving search performance for users who want to find riders from a specific pickup location who have completed at least a certain number of rides.

Завдання

Swipe to start coding

Analyze and optimize the provided SQL query, which searches for riders who have been picked up at '123 Main St' and have completed at least one ride from that location. Your goal is to improve the query's performance using your knowledge of EXPLAIN and query planning.

  • Use EXPLAIN to analyze the performance of the original query.
  • Rewrite the query to improve efficiency, reducing unnecessary joins or aggregations where possible.
  • Ensure the optimized query returns the same results as the original.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 3. Розділ 7
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Suggested prompts:

How can I optimize the search query for better performance?

What indexes should I create on the riders and rides tables?

Can you show an example query for this scenario?

close

bookChallenge: Improving Rider Search Performance

Свайпніть щоб показати меню

In many real-world ride-sharing applications, searching for riders based on their location and ride history is a frequent and performance-critical operation. As you have seen in previous chapters, using EXPLAIN helps you analyze how efficiently a query runs and highlights opportunities for optimization. Now you will apply your skills to a practical scenario involving the riders and rides tables, focusing on improving search performance for users who want to find riders from a specific pickup location who have completed at least a certain number of rides.

Завдання

Swipe to start coding

Analyze and optimize the provided SQL query, which searches for riders who have been picked up at '123 Main St' and have completed at least one ride from that location. Your goal is to improve the query's performance using your knowledge of EXPLAIN and query planning.

  • Use EXPLAIN to analyze the performance of the original query.
  • Rewrite the query to improve efficiency, reducing unnecessary joins or aggregations where possible.
  • Ensure the optimized query returns the same results as the original.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 3. Розділ 7
single

single

some-alt