Tuesday, November 30, 2004

Dynamic SQL is the future

The most stunning thing you'll find in Frans Bouma's blog entry (see my previous entry for more links) is this statement :

There is no precompilation of stored procedure code in SqlServer. It caches execution plans for each query, also ad-hoc queries. Even better: it will parametrize queries which don't even have parameters to keep the execution plan in the cache!

Well, I couldn't belive this. All this while every article I read, and every guru I spoke to said otherwise.
Frans bases his statement on the solid ground of exerpt from SqlServer's Books Online, which atleast I can't argue with.
Overall I'd say, I'm caught up between whether to use Stored Procedures or not. I have heard nothing but praises about Stored Proceduces all my time in SW Dev. But a part of my mind does belive in Frans, and as he wrote, I do kinda agree with him - Dynamic SQL might just be the future.