Hacker News new | past | comments | ask | show | jobs | submit login

I'd like to see the runtime for the same query but (1) without 'distinct', (2) without the date formatting and (3) with an inner join.



My thoughts exactly.

The post references a StackExchange question [1] which has a simple analysis, and four helpful suggestions (similar to yours), as to which the author states:

"I tried the first suggestion, but the results weren't promising. As experimenting with each suggestion could easily take at least half a day, I proceeded with a way I knew would work efficiently and reliably"



Correct. When I see developers using 'distinct' and complaining about some query performance, it's almost always the developer doing it incorrectly rather than an issue with the database.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: