News for hackers. Stuff that matters.
Re:Poor Man's Scalability by troels on Saturday October 15, 2011 @03:39PM (#3115590)
Indexes can most certainly be premature optimisation. There's a cost associated with an index.
Re:Poor Man's Scalability by driverdan on Saturday October 15, 2011 @04:34PM (#3115726)
The cost increases significantly by doing it later on. Indexing when you have little data is easy. Indexing on a live site with millions of rows and lots of users can be much harder.
Re:Poor Man's Scalability by aptwebapps on Sunday October 16, 2011 @12:50AM (#3116569)
Taking it to that extreme is not a valid argument. There's a lot of room between not doing it first and only doing on a live site with millions of rows and lots of users.
Re:Poor Man's Scalability by sjwright on Sunday October 16, 2011 @02:49AM (#3116739)
That might be true for some esoteric indexes, but if we're talking about indexing customer_id on the invoices table, it's not premature -- it's freaking inevitable.
Re:Poor Man's Scalability by eropple on Sunday October 16, 2011 @05:36AM (#3116955)
Yes--and these are the overwhelmingly most common case for a query in most applications. From reading the blog post, it seems like the blog author was either doing pretty frighteningly complex stuff just to render his homepage or he didn't think ahead enough to add fairly standard queryable indices to his collections.

Neither strikes me as terribly smart, and the latter strikes me as writing it right the first time, not "avoiding premature optimizations."