Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The query includes `date_format(created_at, '%x%v1') as week_commit` - meaning it would need to be computed for every row.


That's only in the SELECT statement, which only needs to be performed after the join has been done.


Only for every returned row. The projection does not affect the underlying result set, it merely "shapes" the results you have received. WHERE clauses are always run before SELECT


The query in the article has no WHERE clause. It must calculate that function for every row in `commits`.




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

Search: