You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT DISTINCT city
FROM crime_scene_report
WHERE LOWER(city) = 'sql city';
has a WHERE condition that may perform poorly generally speaking. If there was an index on crime_scene_report.city it might not be utilized due to LOWER(city), leading to bad performance due to a full table scan.
The text was updated successfully, but these errors were encountered:
Thanks for your interest in the project! That specific example is given in the context of learning about the existence of UPPER and LOWER functions, so it's hard to know how to teach those to people without running the theoretical risk you identify. Do you have a suggestion?
Adding a comment about that pitfall after the query. Or have a specific optional section at the end of that tutorial about performance considerations, if you feel it is too early to talk about those when UPPER and LOWER are introduced.
The query
has a
WHERE
condition that may perform poorly generally speaking. If there was an index oncrime_scene_report.city
it might not be utilized due toLOWER(city)
, leading to bad performance due to a full table scan.The text was updated successfully, but these errors were encountered: