Position: SQL Consultant. Pay: Perhaps
Any of you guys SQL experts and willing to help me out on an as-needed basis? Pay would be on performance/by the hour/beer tokens/in kind/whatever you liked.
I'm confident enough with SQL to get most things done but get a bit stuck when it gets advanced (for me at least).
There's an application I've been working on that has about five inter-dependent tables - joined by an ID from one that matches another. It all works as expected, just not as fast as expected as the amount of data grows. This is where my knowledge falls down.
At the moment I'm struggling with working out how to create an index to make a query run faster. Specifically a query that has an ORDER BY clause on it. With no ordering it takes about 0.0001s. With the ordering it takes 0.3s. Still not long but that's on a smallish dataset. As it grows so will this time.
I kind of get the principle of the index and why I need one in this case (the column sorted on isn't in any index) but I'm struggling implementing it and think I either need to go back to first principles or get/pay somebody else to sort it.
Anybody?
If you need to see a schema I can post that here.
Update: I just asked the question more specifically over on stackoverflow.com, which seems like an increasingly useful resource, so I'll see how that goes.
Update 2: No more than 30 minutes have passed and stack overflow has answered my question. It's the first question I've asked there and I have to say I'm very impressed. That's how technical forums should be built Lotus!!
Can't agree more about stackoverflow - great resource, great community, good leadership. Just wish more people would ask Notes questions on there.
Cool! Glad you got your answer!
Timely article.
http://www.alistapart.com/articles/indexing-the-web-its-not-just-googles-business/