Database Reference
In-Depth Information
Advanced calls . Certain operations, such as XML calls and using functions in your
SQL statements, are usually misrepresented in an execution plan; as such, SQL
Azure (and even SQL Server) may return 1% as a cost for those operations. This
may lead you down the wrong path when tuning your SQL statements.
Discarding output . As discussed previously, the duration (as measured by
sys.dm_exec_sessions) includes display time, and that applies to SQL Server
Management Studio. To minimize the time it takes to display the data, you can
disable the output by checking the necessary settings in Query
Query Options.
The same option appears in two places: in the Grid and Text Results. Figure 12-4
shows how to disable the output from the Grid display.
Figure 12-4. Disabling output in SQL Server Management Studio
Indexing
Creating the right indexes can be complex; it can take a long time to fully understand indexing and fine-
tune database queries. One of the most important things to remember with indexing is that its primary
purpose is to help SQL Azure find the data it needs quickly.
Indexes are like smaller tables that contain a subset of the primary table. The tradeoff is that indexes
consume space and must be maintained by the SQL Azure engine as the primary data changes, which
can impact performance under certain scenarios.
Let's quickly review a simplified syntax to create an index:
CREATE INDEX [index_name] ON [table_name]
Search WWH ::




Custom Search