reports, 85
scripts, 61-62
scripts at startup, 25, 140-142
single PL/SQL commands, 39, 445
SQL buffer statements, 51-54
execution plans, 283-292
AUTOTRACE setting, 292-297
creating plan table, 284
improving performance, 297-308
judging results, 298
understanding, 286-292
execution statistics, 295
EXIT clause (WHATEVER), 271, 275
EXIT clause (WHENEVER), 468-469
EXIT command, 26, 445
exiting
SQL*Plus, 26, 445
text editors, 60
EXP[LAIN] parameter (SET AUTOTRACE), 415 EXPLAIN PLAN command, 8, 277, 283-292
creating plan table, 284
judging results, 298
syntax for, 285
understanding execution plans, 286-292 export command (Unix), 360
external text editors, 57-60, 445
extracting data, 155, 158-167
formaluting queries, 158
formatting the data, 159-163
Trang 2reloading extracted data, 167-174
logging, 173-174
spooling data to files, 163-165
SQL*Plus limitations, 157
user-friendly scripts for, 165-167
Trang 3
< previous page page_486 next page >
Page 486 F
failure codes, 272, 275
FAILURE option
WHENEVER OSERROR command, 275
WHENEVER SQLERROR command, 272
FAILURE parameter
EXIT command, 446
QUIT command, 450
feedback
settings for, 385-395
turning off, 138, 164
FEED[BACK] setting, 84, 138, 388
spooling data to file, 164
filename extension, default, 403
files
control files, listing, 343
default extension for command files, 403
editing with text editors, 58
generating files of commands, 257-259
initialization file, 343
multilevel file structure, 248-250
password file, 327
recovery of, 353
redo log files, saving, 345-351
saving SQL buffer, 54-57
search path, setting, 366
sending report output to, 83-84
Trang 4spooling data to, 163-165
SQL*Loader control file, 168-171
startup scripts, 357-360
types of output files, 156-157
working directory, 62-64
FILTER operation (EXPLAIN PLAN), 290
FIRST ROW operation (EXPLAIN PLAN), 290
FIRST_ROWS hint, 302
Fixed Size value (SGA), 337
fixed-width files, 156, 160-162
SQL*Loader control for, 170
FLAGGER setting, 409
FLOAT datatype, 199
FLU[SH] setting, 409
FOLD_A[FTER] parameter (COLUMN command), 69, 438 FOLD_B[EFORE] parameter (COLUMN command), 69, 438 font size for reports, 81
footers and headers
report pages, 74-80, 432, 465
current date in, 106-108
embedded reports and, 371
user variables, 94, 97
reports, 109-111
FOR UPDATE operation (EXPLAIN PLAN), 290
FORCE parameter (STARTUP), 462
foreign key constraints, 202
columns specified in, 187, 200
FOR[MAT] clause
ACCEPT command, 133, 427
Trang 5ATTRIBUTE command, 114, 430
BTITLE command, 78, 433
COLUMN command, 69, 72, 438
REPHEADER, REPFOOTER commands, 109, 454-455 TTITLE command, 75, 466
FORMAT parameter (SET SERVEROUTPUT), 37
format specifications, 470-477
formatting
columns in reports, 68-73
columns (see COLUMN command)
data, 470-477
data to be extracted, 159-163
dates, 107
LONG column lengths, 414
master/detail reports, 93-97
numbers, 375
object columns (reports), 111-115
PRINT command output, 234
report pages, 81-83
settings for, 368-385
word wrap, 37, 384, 473
formulating queries
designing reports, 67
extracting data, 158
forward slash (/)
executing SQL buffer, 51, 53, 426
terminating PL/SQL blocks, 39
terminating SQL statements, 34
FREELIST_GROUPS column
Trang 6ALL_INDEXES view, 188
ALL_TABLES view, 183
FREELISTS column
ALL_INDEXES view, 188
ALL_TABLES view, 183
Trang 7
< previous page page_487 next page >
Page 487 FROM parameter (COPY), 436
full database recovery, 352
FULL hint, 303
FULL parameter (SET FLAGGER), 409
functions
bind variables with, 238-240
viewing information about, 177
G
GENERATED column
ALL_CONSTRAINTS view, 187
ALL_INDEXES view, 190
generating files of commands, 257-259
generating reports (see reports)
GET command, 56, 446
global login file, 358
glogin.sql script (site profile), 357-359
grand totals in reports, 102-106
GRANTABLE column
ALL_COL_PRIVS view, 193
ALL_TAB_VIEWS view, 193
GRANTEE column
ALL_COL_PRIVS view, 193
ALL_TAB_VIEWS view, 193
GRANTOR column
ALL_COL_PRIVS view, 193
ALL_TAB_VIEWS view, 193
grants (see privileges)
Trang 8GROUP BY clause, BREAK with, 90
GUI version of SQL*Plus, 18
starting, 19-23
H
HASH hint, 303
HASH JOIN operation (EXPLAIN PLAN), 290
hash joins, 306
HASH_AJ hint, 303
headers and footers
report pages, 74-80, 432, 465
current date in, 106-108
embedded reports and, 371
user variables, 94, 97
reports, 109-111
headers, report, 109-111
HEA[DING] clause (COLUMN command), 69, 71, 438 HEA[DING] setting, 372
headings for report columns, 71, 372
line break characters, 372
underline characters, 383
HEADS[EP] setting, 372
help
commenting scripts, 151-154
HELP command, 28-29, 447
HELP MENU command, 28
HELP not accessible message, 28
HIDE parameter (ACCEPT), 133, 428
HIGH_VALUE column (ALL_TAB_COLUMNS), 185 hints, 277, 300-308
Trang 9access method hints, 303-305
join operation hints, 305
join order hints, 305
optimizer goal hints, 302
parallel execution hints, 307
HO[ST] command, 447
hot database backups, 342-345
hyphens (-) for comments, 153, 425
I
I (INPUT) command, 42, 49-51, 447
IBM's System R, 6
IF statement (see branching)
immediate database shutdown, 336, 460
IMMEDIATE parameter
SET AUTOCOMMIT command, 406
SHUTDOWN command, 336, 460
importing data (see reloading extracted data)
INCLUDE_COLUMN column (ALL_INDEXES), 188 INDEX hint, 303-305
INDEX operation (EXPLAIN PLAN), 291
INDEX_ASC hint, 303
INDEX_COMBINE hint, 303
INDEX_DESC hint, 303
indexes, 207-214
ALL_IND_COLUMNS view, 190, 207
ALL_INDEXES view, 187-190, 207, 211
describing one (example), 208-211
improving performance with, 298
into LONG columns, 413
Trang 10listing, 207
listing all (example), 211-214
INDEX_FFS hint, 303