- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
free code 128 barcode font for crystal reports Descending Indexes in Objective-C
Descending Indexes Printing Data Matrix In Objective-C Using Barcode creation for iPhone Control to generate, create ECC200 image in iPhone applications. www.OnBarcode.comGTIN - 128 Generation In Objective-C Using Barcode generation for iPhone Control to generate, create USS-128 image in iPhone applications. www.OnBarcode.comDescending indexes were introduced in Oracle8i to extend the functionality of a B*Tree index. They allow for a column to be stored sorted in descending order (from big to small) in the index instead of ascending order (from small to big). Prior releases of Oracle (pre-Oracle8i) always supported the DESC (descending) keyword syntactically, but basically ignored it it had no effect on how the data was stored or used in the index. In Oracle8i and above, however, the DESC keyword changes the way the index is created and used. Oracle has had the ability to read an index backward for quite a while, so you may be wondering why this feature is relevant. For example, if we use a table T: ops$tkyte%ORA11GR2> create table t 2 as 3 select * 4 from all_objects 5 / Table created. ops$tkyte%ORA11GR2> create index t_idx 2 on t(owner,object_type,object_name); Index created. ops$tkyte%ORA11GR2> begin 2 dbms_stats.gather_table_stats 3 ( user, 'T', method_opt=>'for all indexed columns' ); 4 end; 5 / PL/SQL procedure successfully completed. and query it as follows ops$tkyte%ORA11GR2> set autotrace traceonly explain ops$tkyte%ORA11GR2> select owner, object_type 2 from t 3 where owner between 'T' and 'Z' 4 and object_type is not null 5 order by owner DESC, object_type DESC; Printing GTIN - 13 In Objective-C Using Barcode printer for iPhone Control to generate, create EAN13 image in iPhone applications. www.OnBarcode.comBarcode Generator In Objective-C Using Barcode drawer for iPhone Control to generate, create Barcode image in iPhone applications. www.OnBarcode.comCHAPTER 11 INDEXES
Data Matrix 2d Barcode Creator In Objective-C Using Barcode drawer for iPhone Control to generate, create Data Matrix ECC200 image in iPhone applications. www.OnBarcode.comEncoding Code 3 Of 9 In Objective-C Using Barcode encoder for iPhone Control to generate, create Code 39 Extended image in iPhone applications. www.OnBarcode.comExecution Plan ---------------------------------------------------------Plan hash value: 2685572958 ------------------------------------------------------------| Id | Operation | Name | Rows | Bytes | ------------------------------------------------------------| 0 | SELECT STATEMENT | | 784 | 11760 | |* 1 | INDEX RANGE SCAN DESCENDING| T_IDX | 784 | 11760 | ------------------------------------------------------------Oracle will just read the index backward. There is no final sort step in this plan; the data is sorted. Where this descending index feature comes into play, however, is when you have a mixture of columns, and some are sorted ASC (ascending) and some DESC (descending), for example: ops$tkyte%ORA11GR2> select owner, object_type 2 from t 3 where owner between 'T' and 'Z' 4 and object_type is not null 5 order by owner DESC, object_type ASC; Execution Plan ---------------------------------------------------------Plan hash value: 2813023843 --------------------------------------------------------------------------| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | --------------------------------------------------------------------------| 0 | SELECT STATEMENT | | 784 | 11760 | 9 (12)| 00:00:01 | | 1 | SORT ORDER BY | | 784 | 11760 | 9 (12)| 00:00:01 | |* 2 | INDEX RANGE SCAN| T_IDX | 784 | 11760 | 8 (0)| 00:00:01 | --------------------------------------------------------------------------Predicate Information (identified by operation id): --------------------------------------------------2 - access("OWNER">='T' AND "OWNER"<='Z') filter("OBJECT_TYPE" IS NOT NULL) Oracle isn t able to use the index we have in place on (OWNER, OBJECT_TYPE, OBJECT_NAME) anymore to sort the data. It could have read it backward to get the data sorted by OWNER DESC, but it needs to read it forward to get OBJECT_TYPE sorted ASC. Instead, it collected together all of the rows and then sorted. Enter the DESC index: ops$tkyte%ORA11GR2> create index desc_t_idx on t(owner desc,object_type asc); Index created. ops$tkyte%ORA11GR2> select owner, object_type 2 from t 3 where owner between 'T' and 'Z' 4 and object_type is not null 5 order by owner DESC, object_type ASC; Barcode Generator In Objective-C Using Barcode drawer for iPhone Control to generate, create Barcode image in iPhone applications. www.OnBarcode.comUPCE Encoder In Objective-C Using Barcode printer for iPhone Control to generate, create Universal Product Code version E image in iPhone applications. www.OnBarcode.comCHAPTER 11 INDEXES
Data Matrix 2d Barcode Printer In Objective-C Using Barcode generator for iPad Control to generate, create Data Matrix 2d barcode image in iPad applications. www.OnBarcode.comData Matrix Drawer In C# Using Barcode generation for .NET framework Control to generate, create ECC200 image in .NET applications. www.OnBarcode.comExecution Plan ---------------------------------------------------------Plan hash value: 2494308350 ------------------------------------------------------------------------------| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | 889 | 13335 | 3 (0)| 00:00:01 | |* 1 | INDEX RANGE SCAN| DESC_T_IDX | 889 | 13335 | 3 (0)| 00:00:01 | ------------------------------------------------------------------------------Predicate Information (identified by operation id): --------------------------------------------------1 - access(SYS_OP_DESCEND("OWNER")>=HEXTORAW('A5FF') AND SYS_OP_DESCEND("OWNER")<=HEXTORAW('ABFF') ) filter(SYS_OP_UNDESCEND(SYS_OP_DESCEND("OWNER"))>='T' AND SYS_OP_UNDESCEND(SYS_OP_DESCEND("OWNER"))<='Z' AND "OBJECT_TYPE" IS NOT NULL) Once more, we are able to read the data sorted, and there is no extra sort step at the end of the plan. It should be noted that unless your compatible init.ora parameter is set to 8.1.0 or higher, the DESC option on the CREATE INDEX will be silently ignored no warning or error will be produced, as this was the default behavior in prior releases. Encoding Code 128 Code Set B In Java Using Barcode creator for Android Control to generate, create Code 128 Code Set B image in Android applications. www.OnBarcode.comScanning Barcode In Visual C# Using Barcode decoder for .NET Control to read, scan read, scan image in VS .NET applications. www.OnBarcode.comMaking GS1 - 13 In Java Using Barcode maker for Eclipse BIRT Control to generate, create EAN-13 Supplement 5 image in Eclipse BIRT applications. www.OnBarcode.comMake Data Matrix 2d Barcode In Java Using Barcode generation for Android Control to generate, create ECC200 image in Android applications. www.OnBarcode.comUniversal Product Code Version A Maker In Visual Studio .NET Using Barcode encoder for ASP.NET Control to generate, create UPCA image in ASP.NET applications. www.OnBarcode.comMaking GTIN - 12 In Java Using Barcode creator for BIRT Control to generate, create UPCA image in BIRT reports applications. www.OnBarcode.comQR Code 2d Barcode Generator In .NET Using Barcode drawer for VS .NET Control to generate, create QR Code image in Visual Studio .NET applications. www.OnBarcode.comPrint Linear 1D Barcode In .NET Using Barcode drawer for .NET framework Control to generate, create Linear 1D Barcode image in .NET framework applications. www.OnBarcode.comDataMatrix Reader In VS .NET Using Barcode scanner for .NET Control to read, scan read, scan image in .NET applications. www.OnBarcode.comScanning QR Code 2d Barcode In Java Using Barcode reader for Java Control to read, scan read, scan image in Java applications. www.OnBarcode.com |
|