News for hackers. Stuff that matters.
Re:SQL queries don't start with SELECT by cagmz on Friday October 04, 2019 @10:33AM (#21158091)
> Indexes are not created deliberately - we are adding them only when the need is obvious, because some functionality is plain slow.

Is there anything wrong with this? My thinking is that it could be seen as a premature optimization if an index is created without knowing if it will be used.

Re:SQL queries don't start with SELECT by phs318u on Friday October 04, 2019 @10:27PM (#21163466)
In my world, if you don't know whether an index is likely to be used, it indicates a lack of understanding of what your users are likely to be doing, and/or the nature of the data set. Yes, there are marginal use-cases, but overall, you should understand what most of your users/consumers are doing and optimise accordingly.