It can very frustrating trying to help someone who is asking for help, but not giving you what you need to help them. I wanted to put together this post as a sort of FAQ on how can we help you with things like queries and schema problems. If we can’t get certain information we often can’t offer more than general guidelines – and those may or may not apply to your problem.
Query Performance
In general we do not provide support on query performance. There are just too many ways to write the same query, some are fast, some are slow. There is often no way to know short of trying them. In most cases either query is good enough and people just move on. But what if your query needs a certain response time?
If you are simply taking a query from Access builder and it is too slow, that is not good enough. Did you try ANYTHING else? Check your indexes? Anything?
Engine one off code and customization
Microsoft SQL engines (Access, SQL Server, and SQL CE to a lesser extent) will rewrite poorly written queries for you. They sometimes build indexes, temp indexes, lookup tables, cross reference lookup temp systems, all sorts of things under the hood that you may not know about.
So why don’t we do all that? Microsoft spent $1 BILLION on the company that provided that technology. Yes, that is with a B – wow. And that is part of the reason SQL Server is so large.
It has a lot of code paths that are special cased code for one off scenarios. We don’t do that because we want to stay small and lightweight, and because each of those cases you add also have to be documented, tested, and maintained. Each of those add a lot to our workload. If you have 10 special cases to 10 functions you now have 100 combinations to test. Start chaining that out through all the clauses and you end up with huge complexity for test purposes.
Special Cases?
Does that mean we will never special case code? No. We will do it, but only with really good evidence that it is going to impact a lot of use cases. How do we build those use cases? Use cases is where you can really help us. We have a lot of usage scenarios based upon standard ADO.NET patterns and practices. Then we have quite a few from our own applications we built that broke those patterns. Add to that problem reports from users, and you start to get a pretty good comprehensive coverage of SQL patterns.
Continue Reading...