维护产生价值:只需加以注意即可降低数据库成本的五种方法
2010-09-16 00:00:00 来源:WEB开发网这发生在三年前。目前,这个客户使用 DB2 9,DB2 9 会自动地在反复访问的工作文件(包括临时表)上生成稀疏索引。但是,这种改进的机会随时都会出现。SQL 是一个 “移动的靶子”,必须及时掌握新的发展:在 1983 年刚诞生时,DB2 SQL 是一种非常粗糙的查询语言,当时只支持内联结、子查询、GROUP BY 子句、HAVING 子句、ORDER BY 子句和大约 21 个内置函数。27 年后的今天,DB2 9 for z/OS 可以使用的 SQL 特性已经极其丰富了(见边栏 “DB2 SQL 已经成熟了”)。
一些 SQL 特性作用相同,但是大多数特性提供独特的功能。一定要及时了解并充分利用新特性,因为许多新特性可以提高性能和降低应用程序运行成本。
DB2 SQL 已经成熟了
当最初引入 DB2 SQL 时,只能使用很少几个功能。现在,可以选用的特性非常多:
TABLE EXPRESSIONS, COMPLEX CORRELATION, GLOBAL TEMPORARY TABLES, CASE, 100+ BUILT-IN FUNCTIONS, LIMITED FETCH, SCROLLABLE CURSORS, UNION EVERYWHERE, MIN/MAX SINGLE INDEX SUPPORT, SELF REFERENCING UPDATES WITH SUBQUERIES, SORT AVOIDANCE FOR ORDER BY, AND ROW EXPRESSIONS, 2M STATEMENT LENGTH, GROUP BY EXPRESSION, SEQUENCES, SC ALAR FULLSELECT, MATERIALIZED QUERY TABLES, COMMON TABLE EXPRESSIONS, RECURSIVE SQL, CURENT PA CKAGE PA TH, VOLATILE TABLE SUPPORT, STAR JOIN SPARSE INDEX, QUALIFIED COLUMN NAMES, MULTIPLE DISTINCT CLAUSES, IS NOT DISTINCT FROM, ON COMIT DROP, TRANSPARENT ROWID COLUMN, GET DIAGNOSTICS, STAGE1 UNLIKE DATA TYPES, MULTI-ROW INSERT, MULTI-ROW FETCH, DYNAMIC SCROLLABLE CURSORS, MULTIPLE CCSIDS PER STATEMENT, ENHANCED UNICODE, AND PARALLEL SORT, TRUN CATE, DECIMAL FLOAT, VARBINARY , OPTIMISTIC LOCKING, FETCH CONTINUE, MERGE, CALL FROM TRIGG ER, STATEMENT ISOLATION, FOR READ ONLY KEEP UPDATE LOCKS, SET CURENT SCHEMA, CLIENT SPECIAL REGISTERS, LONG SQL OBJECT NAMES, SELECT FROM INSERT, UPDATE, DELETE, MERGE, INSTEAD OF TRIGGER, NATIVE SQL PROCEDURE LANGUAGE, BIGINT, FILE REFERENCE VARIABLES, XML, FETCH FIRST & ORDER BY IN SUBSELECT AND FULLSELECT, CASELESS COMPARISONS, INTERSECT, EXCEPT, NOT LOGGED TABLES
更多精彩
赞助商链接