Support ongoing development - donate to help us maintain and improve the platform. 🖥️ Support sqltest →
SQL code copied to buffer
Task 30:

Create Functional Index

MySQL
For analytical purposes, we frequently query the rental table with conditions similar to DATE_FORMAT(return_date, '%Y-%m') = 'YYYY-MM' (where 'YYYY-MM' represents a specific year and month). To significantly improve the performance of these queries, create a functional index named idx_return_date_func on the return_date column, utilizing the DATE_FORMAT function.
Expected result Columns: 15 · Rows: 1
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Visible Expression

Write your query below and click "Check it!". Tables are described in the right pane.

The query result will appear here. Ctrl+Enter - Run query

Hi! Could we please enable some services and cookies to improve your experience and our website?

Privacy & Cookie Policy.