Oracle v SQL Server CBO
After coming from a SQL Server background, the oracle query optimizer seems to be much less 'sacrosanct' than on SQL Server. On SS, it is very much discouraged that you use query hints (it is...
View ArticleSQL Server - How do redundant indexes impact query performance?
The indexes are affecting the Add/Update operations however i was wondering whether the redundant indexes will affect the query performance or not? How the redundant indexes are handled by the SQL...
View ArticleSQL 2008 Row_Number SLOW with variables, FAST without
First, let me apologize if this is posted in the wrong forum, or is too esoteric, etc. That said,...we use some COTS software that doesn't use stored procedures, just parameterized sql using...
View ArticleWhy is index scan run on outer join when not using "SELECT TOP"
If I run the following query **without** "TOP" in the Select clause then a index scan is run against table tBookingGuest. When I run the query with "TOP(10)" the optimizer chooses to do an index seek...
View ArticleOptimizer plays havoc with tally numbers
Hi! I'm trying to generate numbers for financial calculation. Therefore I'm using a Tally Table Function based on an article by Itzik Ben-Gan: IF EXISTS (SELECT * FROM sys.objects WHERE object_id =...
View Articlewhat is the best way of handling tables with no clusterd index?
I have a database in SQL 2000 139 tables that have no clustered index.the tables in the database have no referential integrity( ie no primary key -foreign key relationship established). any suggestion...
View ArticleSQL Query Optimization
I have this query, it returns 570 rows, but runs 2m 35s. In SQL the query execute, but in my solution, it gives a timeout. How can I optimize this to run under 1m, pref 30s. SELECT [Region] =...
View ArticleDoes cost threshold for parallelism parameter could influence on serial plans...
Today I had something strange: "cost threshold for parallelism: option to specify the threshold at which Microsoft SQL Server creates and runs parallel plans for queries"...
View Article