Ever so often, queries include some aggregates data. In a datawarehouse environment, they are frequently used for metric and Key Performance Indicator (KPI) calculations. Aggregates are also used a lot for reporting purposes and for statistical computation. When a query perform poorly, our first instinct is to add an index to speed it up. Creating a […]
Posts Tagged ‘Index’
March 25, 2012 by Francois · 3 Comments
Filed under: Performance, TSQL
Social Tagging: Index • indexed view • join • query plan • TSQL • view
Filed under: Performance, TSQL
Social Tagging: Index • indexed view • join • query plan • TSQL • view
September 13, 2011 by Francois · 2 Comments
Filed under: Performance, TSQL
Social Tagging: Index • indexes • OPTION (RECOMPILE) • query plan • set statistics profile • statistics • sub-optimal query plan • table variables • temp tables
Filed under: Performance, TSQL
Social Tagging: Index • indexes • OPTION (RECOMPILE) • query plan • set statistics profile • statistics • sub-optimal query plan • table variables • temp tables
The main reason why Microsoft introduced table variable in SQL Server 2000 is to reduce stored procedure recompilations (a recompilation occurs when the stored procedure execution plan is recreated). Table variables also have a well defined scope (the current procedure or function) and they induce less logging and locking (because their transaction last for a […]
April 29, 2011 by Francois · 2 Comments
Filed under: Performance
Social Tagging: Clustered • Heap • Index • sql • sql server
Filed under: Performance
Social Tagging: Clustered • Heap • Index • sql • sql server
Heap tables (tables without a clustered index) are generally not part of a good database design. Unless you never actually query your table, you should always put a clustered index on it. Heap table are generally slower on selects, updates and deletes. They are also generally slower on inserts if you decide to use a […]
RSS