Apress.Expert.Oracle.Database.Architecture.9i.and.10g.Programming.Techniques.and.Solutions.Sep.2005

rekharaghuram
from rekharaghuram More from this publisher
05.11.2015 Views

■INDEX 713 and OLTP, 601–4, 606 overview, 590–92 local indexes vs. global indexes, 583 overview, 584 partition elimination behavior, 584–88 and unique constraints, 588–90 overview, 582–83 index partitioning schemes, 584, 609 INDEX RANGE SCAN, 605 compared to FAST FULL SCAN, 438 compared to TABLE ACCESS BY INDEX ROWID, 438 index segment type, 340 INDEX UNIQUE SCAN, 604 INDEX_STATS command, 364 indexes. See also index partitioning application domain indexes, 423, 469–70 B*Tree indexes, 422–23 descending, 435–36 index key compression, 426–29 overview, 423, 425–26 reasons for using, 437 reverse key, 429–35 when to use, 437–42, 444–47 bitmap indexes, 422, 448 overview, 448–49 reasons for using, 449 when to use, 449–55 descending indexes, 435 frequently asked questions do indexes work on views, 471 do nulls and indexes work together, 471–72, 474 should foreign keys be indexed, 474–75 why index isn’t getting used, 475–81 function-based indexes, 423 CASE, 467–68 example, 456–59, 461–64 implementation details, 455–56 implementing, 455 implementing selective uniqueness, 466 indexing only some rows, 464–66 ORA-01743, 468–69 overview, 455 problems with, 468 myths about most discriminating elements should be first, 485–88 space is never reused in an index, 482–85 overview, 421–23 physical data layout, importance of, 441 reverse key, 422, 429 unused, reasons for, 475 in-doubt distributed transaction, 174, 274 INFILE * option, 651 INFILE clause, 665 INFILE FILENAME option, 680, SQLLDR Informix, 184–85 INITIAL extent, 403 INITIALLY IMMEDIATE command, 264 init.ora file, 66, 69–71, 137, 436 INITRANS parameter, 214–15, 351, 354 tables, syntax, 351 TX locks, 214 INLINE VIEW table, 406 inline views, 37 INSERT command, 26 INSERT INTO T statement, 259, 288 INSERT statement, 94, 200–201, 223, 323, 472, 659, 661, 681, 684, 686, SQL inserts, blocked, 200–203 instance compared to database, 50 vs. database, 50–55 definition, 50 INSTANCE_NUMBER parameter setting, 73 instrumenting code, 6 INTEGER datatype, 511 integrity constraints and transactions DEFERRABLE constraints and cascading updates, 263–65 IMMEDIATE constraints, 262–63 overview, 262 interMedia Text indexes, 470 interMedia type, 678 internal LOBs CACHE clause, 552 CHUNK clause, 549 LOB STORAGE clause, 552–53 LOB tablespace, 543–44 overview, 541–43 PCTVERSION clause, 549–51 RETENTION clause, 551–52 IN ROW clause, 544–46, 548–49 internal locks, 209, 221. See also latches interoperability, 36 INTERVAL DAY TO SECOND data type, 491 INTERVAL type, 531 INTERVAL DAY TO SECOND, 539–40 INTERVAL YEAR TO MONTH, 538–39 overview, 537–38 INTERVAL YEAR TO MONTH data type, 491 INTO TABLE DEPT option, 651 I/O slaves, 181–82 IOT_ADDRESSES table, 359–60 ipcs command, 51, 53 IS_WINDOWS function, 694 J Java pool, SGA, 137, 151–52 JAVA_POOL_SIZE parameter, 137 JavaServer Pages (JSP), 6 Jnnn process, 179

714 ■INDEX job queue coordinator (CJQ0), 179 job queues. See SNPn JOB_QUEUE_PROCESSES, 646 K Keep pool, 141, 552 KEYWORDS table, 355 L L_BUFFER variable, 517 L_BUFFER_LEN variable, 517 L_DESCTBL variable, 697 L_REDO_SIZE variable, 303 L_SESSION_ID variable, 642 L_SOME_VARIABLE, 28 LAG( ) function, 88 Large pool, SGA, 137, 150–51 LARGE_POOL_SIZE parameter, 137, 169 LAST_MOD column, 191–93 latches, 11, 209, 231. See also internal locks compared to internal locks, 221 latch spinning, 221–22 latching mechanism, 14 measuring cost of latching shared resource, 222–23 with bind variables, 226–28 performance scalability comparison, 228 without bind variables, 223–26 overview, 220–21 LCK0 (lock) process, 178 LCKN (lock process), 178 LDAP (Lightweight Directory Access Protocol) server, 61 leaf blocks, 424 leaf nodes, 424 legacy dictionary-managed tablespace, 631 legacy init.ora parameter files, 69–71 LENGTHB (length in bytes) function, 501 LGWR (log writer), 56, 140, 175–76, 179, 318 COMMIT statement, 296 focused background processes, 176 synchronous calls to from COMMIT, 297 libraries, Oracle, 157 Lightweight Directory Access Protocol (LDAP) server, 61 list partitioning, 567, 575–77, 581 listener, dedicated server, 61 LMB (lock manager daemon) process, 178 LMON (lock monitor) process, 178 LMSn (lock manager server) process, 178 LMT_AUTO, 634 LMT_UNIFORM, 634 LN (natural log), 512 LOAD DATA option, 651 LOAD_TYPE column, 588 LoadBLOBFromFile entry point, 669 LoadCLOBFromFile entry point, 669 LOADFROMFILE( ) routine, 672 LoadFromFile entry point, 669 LOADFROMFILE function, DBMS_LOB package, 670 loading and unloading data, 649. See also SQL*Loader (SQLLDR) Data Pump unload, 701–3 external tables dealing with errors, 687–88, 690 multiuser issues, 691–92 overview, 680–81 setting up, 682–85, 687 using to load different files, 690 flat file unload, 692–94, 696–701 loading data with embedded newlines, 663 loading dates, 658 loading delimited data, 654 loading fixed format data, 656 loading into LOBS, 669 DBMS_LOB package, 670 Directory object, 670 LOBFILEs, 675 PL/SQL, 669 SQLLDR, 673, 675–76 loading tab-delimited data, 655 OCI programs, 650 overview, 649 LOB locators, 542, 550 lob partition segment type, 340 LOB STORAGE clause, 552–53 LOB_DEMO table, 676 LOBFILEs loading data into LOBS, 675 TERMINATED BY EOF statement, 675 lobindex, 543, 548 LOBs BFILEs, 553–54 internal, 541–43 CACHE clause, 552 CHUNK clause, 549 LOB STORAGE clause, 552–53 LOB tablespace, 543–44 PCTVERSION clause, 549–51 RETENTION clause, 551–52 IN ROW clause, 544–46, 548–49 loading overview, 669 via PL/SQL, 669–71, 673 via SQLLDR, 673–78 overview, 540–41 lobsegment, 548 LOC tab, 656 LOCAL index, 594 local indexes vs. global indexes, 583 local nonprefixed indexes, 584 local prefixed indexes, 584

■INDEX 713<br />

<strong>and</strong> OLTP, 601–4, 606<br />

overview, 590–92<br />

local indexes<br />

vs. global indexes, 583<br />

overview, 584<br />

partition elimination behavior, 584–88<br />

<strong>and</strong> unique constraints, 588–90<br />

overview, 582–83<br />

index partitioning schemes, 584, 609<br />

INDEX RANGE SCAN, 605<br />

compared to FAST FULL SCAN, 438<br />

compared to TABLE ACCESS BY INDEX<br />

ROWID, 438<br />

index segment type, 340<br />

INDEX UNIQUE SCAN, 604<br />

INDEX_STATS comm<strong>and</strong>, 364<br />

indexes. See also index partitioning<br />

application domain indexes, 423, 469–70<br />

B*Tree indexes, 422–23<br />

descending, 435–36<br />

index key compression, 426–29<br />

overview, 423, 425–26<br />

reasons for using, 437<br />

reverse key, 429–35<br />

when to use, 437–42, 444–47<br />

bitmap indexes, 422, 448<br />

overview, 448–49<br />

reasons for using, 449<br />

when to use, 449–55<br />

descending indexes, 435<br />

frequently asked questions<br />

do indexes work on views, 471<br />

do nulls <strong>and</strong> indexes work together,<br />

471–72, 474<br />

should foreign keys be indexed, 474–75<br />

why index isn’t getting used, 475–81<br />

function-based indexes, 423<br />

CASE, 467–68<br />

example, 456–59, 461–64<br />

implementation details, 455–56<br />

implementing, 455<br />

implementing selective uniqueness, 466<br />

indexing only some rows, 464–66<br />

ORA-01743, 468–69<br />

overview, 455<br />

problems with, 468<br />

myths about<br />

most discriminating elements should be<br />

first, 485–88<br />

space is never reused in an index, 482–85<br />

overview, 421–23<br />

physical data layout, importance of, 441<br />

reverse key, 422, 429<br />

unused, reasons for, 475<br />

in-doubt distributed transaction, 174, 274<br />

INFILE * option, 651<br />

INFILE clause, 665<br />

INFILE FILENAME option, 680, SQLLDR<br />

Informix, 184–85<br />

INITIAL extent, 403<br />

INITIALLY IMMEDIATE comm<strong>and</strong>, 264<br />

init.ora file, 66, 69–71, 137, 436<br />

INITRANS parameter, 214–15, 351, 354<br />

tables, syntax, 351<br />

TX locks, 214<br />

INLINE VIEW table, 406<br />

inline views, 37<br />

INSERT comm<strong>and</strong>, 26<br />

INSERT INTO T statement, 259, 288<br />

INSERT statement, 94, 200–201, 223, 323, 472,<br />

659, 661, 681, 684, 686, SQL<br />

inserts, blocked, 200–203<br />

instance<br />

compared to database, 50<br />

vs. database, 50–55<br />

definition, 50<br />

INSTANCE_NUMBER parameter setting, 73<br />

instrumenting code, 6<br />

INTEGER datatype, 511<br />

integrity constraints <strong>and</strong> transactions<br />

DEFERRABLE constraints <strong>and</strong> cascading<br />

updates, 263–65<br />

IMMEDIATE constraints, 262–63<br />

overview, 262<br />

interMedia Text indexes, 470<br />

interMedia type, 678<br />

internal LOBs<br />

CACHE clause, 552<br />

CHUNK clause, 549<br />

LOB STORAGE clause, 552–53<br />

LOB tablespace, 543–44<br />

overview, 541–43<br />

PCTVERSION clause, 549–51<br />

RETENTION clause, 551–52<br />

IN ROW clause, 544–46, 548–49<br />

internal locks, 209, 221. See also latches<br />

interoperability, 36<br />

INTERVAL DAY TO SECOND data type, 491<br />

INTERVAL type, 531<br />

INTERVAL DAY TO SECOND, 539–40<br />

INTERVAL YEAR TO MONTH, 538–39<br />

overview, 537–38<br />

INTERVAL YEAR TO MONTH data type, 491<br />

INTO TABLE DEPT option, 651<br />

I/O slaves, 181–82<br />

IOT_ADDRESSES table, 359–60<br />

ipcs comm<strong>and</strong>, 51, 53<br />

IS_WINDOWS function, 694<br />

J<br />

Java pool, SGA, 137, 151–52<br />

JAVA_POOL_SIZE parameter, 137<br />

JavaServer Pages (JSP), 6<br />

Jnnn process, 179

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!