-
Notifications
You must be signed in to change notification settings - Fork 0
/
mssql_indexes.UMLS2018AA.SQL
647 lines (563 loc) · 36.6 KB
/
mssql_indexes.UMLS2018AA.SQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
USE [UMLS2018AA]
/************************************************************************************/
/* Unified Medical Language System - Microsoft SQL Server data load script */
/* Script 3 of 3 */
/* */
/* This script is based upon the "SQL load script for Metathesaurus subset" (Feb 2011) of Dr. Nader Elshehabi, shared
/* on the UMLS website in the UMLS Community - User Contributions section, and upon the */
/* Oracle scripts created during MetamorphoSys execution in the 2018AA release. */
/* https://www.nlm.nih.gov/research/umls/implementation_resources/community/dbloadscripts/metathesaurus_sql.txt */
/* */
/* See the comments of the table creation script for recommended usage */
/************************************************************************************/
/****** CREATE tables indexes ******/
-- WHENEVER SQLERROR EXIT -1
-- SET ECHO ON
-- CREATE INDEX X_MRCONSO_CUI ON MRCONSO(CUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrconso]') AND name = N'X_MRCONSO_CUI')
CREATE NONCLUSTERED INDEX [X_MRCONSO_CUI] ON [dbo].[mrconso]
(
[CUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- ALTER TABLE MRCONSO ADD CONSTRAINT X_MRCONSO_PK PRIMARY KEY (AUI)
-- USING INDEX PCTFREE 10 COMPUTE STATISTICS;
ALTER TABLE [dbo].[MRCONSO] ADD CONSTRAINT [X_MRCONSO_PK] PRIMARY KEY CLUSTERED
(
[AUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
/*
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrconso]') AND name = N'primary key')
CREATE UNIQUE NONCLUSTERED INDEX [primary key] ON [dbo].[mrconso]
(
[AUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
*/
-- CREATE INDEX X_MRCONSO_SUI ON MRCONSO(SUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrconso]') AND name = N'X_MRCONSO_SUI')
CREATE NONCLUSTERED INDEX [X_MRCONSO_SUI] ON [dbo].[mrconso]
(
[SUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRCONSO_LUI ON MRCONSO(LUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrconso]') AND name = N'X_MRCONSO_LUI')
CREATE NONCLUSTERED INDEX [X_MRCONSO_LUI] ON [dbo].[mrconso]
(
[LUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRCONSO_CODE ON MRCONSO(CODE)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrconso]') AND name = N'X_MRCONSO_CODE')
CREATE NONCLUSTERED INDEX [X_MRCONSO_CODE] ON [dbo].[mrconso]
(
[CODE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRCONSO_SAB_TTY ON MRCONSO(SAB,TTY)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrconso]') AND name = N'X_MRCONSO_SAB_TTY')
CREATE NONCLUSTERED INDEX [X_MRCONSO_SAB_TTY] ON [dbo].[mrconso]
(
[SAB] ASC,
[TTY] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRCONSO_SCUI ON MRCONSO(SCUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrconso]') AND name = N'X_MRCONSO_SCUI')
CREATE NONCLUSTERED INDEX [X_MRCONSO_SCUI] ON [dbo].[mrconso]
(
[SCUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRCONSO_SDUI ON MRCONSO(SDUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrconso]') AND name = N'X_MRCONSO_SDUI')
CREATE NONCLUSTERED INDEX [X_MRCONSO_SDUI] ON [dbo].[mrconso]
(
[SDUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRCONSO_STR ON MRCONSO(STR)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrconso]') AND name = N'X_MRCONSO_STR')
CREATE NONCLUSTERED INDEX [X_MRCONSO_STR] ON [dbo].[mrconso]
(
[STR] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRCXT_CUI ON MRCXT(CUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrcxt]') AND name = N'X_MRCXT_CUI')
CREATE NONCLUSTERED INDEX [X_MRCXT_CUI] ON [dbo].[mrcxt]
(
[CUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRCXT_AUI ON MRCXT(AUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrcxt]') AND name = N'X_MRCXT_AUI')
CREATE NONCLUSTERED INDEX [X_MRCXT_AUI] ON [dbo].[mrcxt]
(
[AUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRCXT_SAB ON MRCXT(SAB)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrcxt]') AND name = N'X_MRCXT_SAB')
CREATE NONCLUSTERED INDEX [X_MRCXT_SAB] ON [dbo].[mrcxt]
(
[SAB] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRDEF_CUI ON MRDEF(CUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrdef]') AND name = N'X_MRDEF_CUI')
CREATE NONCLUSTERED INDEX [X_MRDEF_CUI] ON [dbo].[mrdef]
(
[CUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRDEF_AUI ON MRDEF(AUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrdef]') AND name = N'X_MRDEF_AUI')
CREATE NONCLUSTERED INDEX [X_MRDEF_AUI] ON [dbo].[mrdef]
(
[AUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- ALTER TABLE MRDEF ADD CONSTRAINT X_MRDEF_PK PRIMARY KEY (ATUI)
-- USING INDEX PCTFREE 10 COMPUTE STATISTICS;
ALTER TABLE [dbo].[MRDEF] ADD CONSTRAINT [X_MRDEF_PK] PRIMARY KEY CLUSTERED
(
[ATUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
/*
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrdef]') AND name = N'primary key')
CREATE UNIQUE NONCLUSTERED INDEX [primary key] ON [dbo].[mrdef]
(
[ATUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
*/
-- CREATE INDEX X_MRDEF_SAB ON MRDEF(SAB)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrdef]') AND name = N'X_MRDEF_SAB')
CREATE NONCLUSTERED INDEX [X_MRDEF_SAB] ON [dbo].[mrdef]
(
[SAB] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRHIER_CUI ON MRHIER(CUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrhier]') AND name = N'X_MRHIER_CUI')
CREATE NONCLUSTERED INDEX [X_MRHIER_CUI] ON [dbo].[mrhier]
(
[CUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRHIER_AUI ON MRHIER(AUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrhier]') AND name = N'X_MRHIER_AUI')
CREATE NONCLUSTERED INDEX [X_MRHIER_AUI] ON [dbo].[mrhier]
(
[AUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRHIER_SAB ON MRHIER(SAB)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrhier]') AND name = N'X_MRHIER_SAB')
CREATE NONCLUSTERED INDEX [X_MRHIER_SAB] ON [dbo].[mrhier]
(
[SAB] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRHIER_PTR ON MRHIER(PTR)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrhier]') AND name = N'X_MRHIER_PTR')
CREATE NONCLUSTERED INDEX [X_MRHIER_PTR] ON [dbo].[mrhier]
(
[PTR] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRHIER_PAUI ON MRHIER(PAUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrhier]') AND name = N'X_MRHIER_PAUI')
CREATE NONCLUSTERED INDEX [X_MRHIER_PAUI] ON [dbo].[mrhier]
(
[PAUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRHIST_CUI ON MRHIST(CUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrhist]') AND name = N'X_MRHIST_CUI')
CREATE NONCLUSTERED INDEX [X_MRHIST_CUI] ON [dbo].[mrhist]
(
[CUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRHIST_SOURCEUI ON MRHIST(SOURCEUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRHIST]') AND name = N'X_MRHIST_SOURCEUI')
CREATE NONCLUSTERED INDEX [X_MRHIST_SOURCEUI] ON [dbo].[MRHIST]
(
[SOURCEUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRHIST_SAB ON MRHIST(SAB)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRHIST]') AND name = N'X_MRHIST_SAB')
CREATE NONCLUSTERED INDEX [X_MRHIST_SAB] ON [dbo].[MRHIST]
(
[SAB] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- ALTER TABLE MRRANK ADD CONSTRAINT X_MRRANK_PK PRIMARY KEY (SAB,TTY)
-- USING INDEX PCTFREE 10 COMPUTE STATISTICS;
ALTER TABLE [dbo].[MRRANK] ADD CONSTRAINT [X_MRRANK_PK] PRIMARY KEY CLUSTERED
(
[SAB,TTY] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRREL_CUI1 ON MRREL(CUI1)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRREL]') AND name = N'X_MRREL_CUI1')
CREATE NONCLUSTERED INDEX [X_MRREL_CUI1] ON [dbo].[MRREL]
(
[CUI1] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRREL_AUI1 ON MRREL(AUI1)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRREL]') AND name = N'X_MRREL_AUI1')
CREATE NONCLUSTERED INDEX [X_MRREL_AUI1] ON [dbo].[MRREL]
(
[AUI1] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRREL_CUI2 ON MRREL(CUI2)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRREL]') AND name = N'X_MRREL_CUI2')
CREATE NONCLUSTERED INDEX [X_MRREL_CUI2] ON [dbo].[MRREL]
(
[CUI2] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRREL_AUI2 ON MRREL(AUI2)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRREL]') AND name = N'X_MRREL_AUI2')
CREATE NONCLUSTERED INDEX [X_MRREL_AUI2] ON [dbo].[MRREL]
(
[AUI2] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- ALTER TABLE MRREL ADD CONSTRAINT X_MRREL_PK PRIMARY KEY (RUI)
-- USING INDEX PCTFREE 10 COMPUTE STATISTICS;
ALTER TABLE [dbo].[MRREL] ADD CONSTRAINT [X_MRREL_PK] PRIMARY KEY CLUSTERED
(
[RUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRREL_SAB ON MRREL(SAB)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRREL]') AND name = N'X_MRREL_SAB')
CREATE NONCLUSTERED INDEX [X_MRREL_SAB] ON [dbo].[MRREL]
(
[SAB] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- ALTER TABLE MRSAB ADD CONSTRAINT X_MRSAB_PK PRIMARY KEY (VSAB)
-- USING INDEX PCTFREE 10 COMPUTE STATISTICS;
ALTER TABLE [dbo].[MRSAB] ADD CONSTRAINT [X_MRSAB_PK] PRIMARY KEY CLUSTERED
(
[VSAB] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRSAB_RSAB ON MRSAB(RSAB)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRSAB]') AND name = N'X_MRSAB_RSAB')
CREATE NONCLUSTERED INDEX [X_MRSAB_RSAB] ON [dbo].[MRSAB]
(
[RSAB] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRSAT_CUI ON MRSAT(CUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRSAT]') AND name = N'X_MRSAT_CUI')
CREATE NONCLUSTERED INDEX [X_MRSAT_CUI] ON [dbo].[MRSAT]
(
[CUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRSAT_METAUI ON MRSAT(METAUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRSAT]') AND name = N'X_MRSAT_METAUI')
CREATE NONCLUSTERED INDEX [X_MRSAT_METAUI] ON [dbo].[MRSAT]
(
[METAUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- ALTER TABLE MRSAT ADD CONSTRAINT X_MRSAT_PK PRIMARY KEY (ATUI)
-- USING INDEX PCTFREE 10 COMPUTE STATISTICS;
ALTER TABLE [dbo].[MRSAT] ADD CONSTRAINT [X_MRSAT_PK] PRIMARY KEY CLUSTERED
(
[ATUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRSAT_SAB ON MRSAT(SAB)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRSAT]') AND name = N'X_MRSAT_SAB')
CREATE NONCLUSTERED INDEX [X_MRSAT_SAB] ON [dbo].[MRSAT]
(
[SAB] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRSAT_ATN ON MRSAT(ATN)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRSAT]') AND name = N'X_MRSAT_ATN')
CREATE NONCLUSTERED INDEX [X_MRSAT_ATN] ON [dbo].[MRSAT]
(
[ATN] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRSTY_CUI ON MRSTY(CUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRSTY]') AND name = N'X_MRSTY_CUI')
CREATE NONCLUSTERED INDEX [X_MRSTY_CUI] ON [dbo].[MRSTY]
(
[CUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- ALTER TABLE MRSTY ADD CONSTRAINT X_MRSTY_PK PRIMARY KEY (ATUI)
-- USING INDEX PCTFREE 10 COMPUTE STATISTICS;
ALTER TABLE [dbo].[MRSTY] ADD CONSTRAINT [X_MRSTY_PK] PRIMARY KEY CLUSTERED
(
[ATUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRSTY_STY ON MRSTY(STY)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRSTY]') AND name = N'X_MRSTY_STY')
CREATE NONCLUSTERED INDEX [X_MRSTY_STY] ON [dbo].[MRSTY]
(
[STY] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXNS_ENG_NSTR ON MRXNS_ENG(NSTR)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXNS_ENG]') AND name = N'X_MRXNS_ENG_NSTR')
CREATE NONCLUSTERED INDEX [X_MRXNS_ENG_NSTR] ON [dbo].[MRXNS_ENG]
(
[NSTR] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXNW_ENG_NWD ON MRXNW_ENG(NWD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXNW_ENG]') AND name = N'X_MRXNW_ENG_NWD')
CREATE NONCLUSTERED INDEX [X_MRXNW_ENG_NWD] ON [dbo].[MRXNW_ENG]
(
[NWD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_BAQ_WD ON MRXW_BAQ(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_BAQ]') AND name = N'X_MRXW_BAQ_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_BAQ_WD] ON [dbo].[MRXW_BAQ]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_CHI_WD ON MRXW_CHI(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_CHI]') AND name = N'X_MRXW_CHI_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_CHI_WD] ON [dbo].[MRXW_CHI]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_CZE_WD ON MRXW_CZE(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_CZE]') AND name = N'X_MRXW_CZE_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_CZE_WD] ON [dbo].[MRXW_CZE]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_DAN_WD ON MRXW_DAN(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_DAN]') AND name = N'X_MRXW_DAN_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_DAN_WD] ON [dbo].[MRXW_DAN]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_DUT_WD ON MRXW_DUT(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_DUT]') AND name = N'X_MRXW_DUT_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_DUT_WD] ON [dbo].[MRXW_DUT]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_ENG_WD ON MRXW_ENG(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_ENG]') AND name = N'X_MRXW_ENG_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_ENG_WD] ON [dbo].[MRXW_ENG]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_EST_WD ON MRXW_EST(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_EST]') AND name = N'X_MRXW_EST_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_EST_WD] ON [dbo].[MRXW_EST]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_FIN_WD ON MRXW_FIN(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_FIN]') AND name = N'X_MRXW_FIN_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_FIN_WD] ON [dbo].[MRXW_FIN]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_FRE_WD ON MRXW_FRE(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_FRE]') AND name = N'X_MRXW_FRE_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_FRE_WD] ON [dbo].[MRXW_FRE]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_GER_WD ON MRXW_GER(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_GER]') AND name = N'X_MRXW_GER_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_GER_WD] ON [dbo].[MRXW_GER]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_GRE_WD ON MRXW_GRE(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_GRE]') AND name = N'X_MRXW_GRE_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_GRE_WD] ON [dbo].[MRXW_GRE]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_HEB_WD ON MRXW_HEB(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_HEB]') AND name = N'X_MRXW_HEB_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_HEB_WD] ON [dbo].[MRXW_HEB]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_HUN_WD ON MRXW_HUN(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_HUN]') AND name = N'X_MRXW_HUN_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_HUN_WD] ON [dbo].[MRXW_HUN]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_ITA_WD ON MRXW_ITA(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_ITA]') AND name = N'X_MRXW_ITA_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_ITA_WD] ON [dbo].[MRXW_ITA]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_JPN_WD ON MRXW_JPN(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_JPN]') AND name = N'X_MRXW_JPN_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_JPN_WD] ON [dbo].[MRXW_JPN]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_KOR_WD ON MRXW_KOR(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_KOR]') AND name = N'X_MRXW_KOR_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_KOR_WD] ON [dbo].[MRXW_KOR]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_LAV_WD ON MRXW_LAV(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_LAV]') AND name = N'X_MRXW_LAV_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_LAV_WD] ON [dbo].[MRXW_LAV]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_NOR_WD ON MRXW_NOR(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_NOR]') AND name = N'X_MRXW_NOR_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_NOR_WD] ON [dbo].[MRXW_NOR]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_POL_WD ON MRXW_POL(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_POL]') AND name = N'X_MRXW_POL_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_POL_WD] ON [dbo].[MRXW_POL]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_POR_WD ON MRXW_POR(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_POR]') AND name = N'X_MRXW_POR_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_POR_WD] ON [dbo].[MRXW_POR]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_RUS_WD ON MRXW_RUS(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_RUS]') AND name = N'X_MRXW_RUS_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_RUS_WD] ON [dbo].[MRXW_RUS]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_SCR_WD ON MRXW_SCR(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_SCR]') AND name = N'X_MRXW_SCR_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_SCR_WD] ON [dbo].[MRXW_SCR]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_SPA_WD ON MRXW_SPA(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_SPA]') AND name = N'X_MRXW_SPA_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_SPA_WD] ON [dbo].[MRXW_SPA]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_SWE_WD ON MRXW_SWE(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_SWE]') AND name = N'X_MRXW_SWE_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_SWE_WD] ON [dbo].[MRXW_SWE]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRXW_TUR_WD ON MRXW_TUR(WD)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRXW_TUR]') AND name = N'X_MRXW_TUR_WD')
CREATE NONCLUSTERED INDEX [X_MRXW_TUR_WD] ON [dbo].[MRXW_TUR]
(
[WD] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_AMBIGSUI_SUI ON AMBIGSUI(SUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AMBIGSUI]') AND name = N'X_AMBIGSUI_SUI')
CREATE NONCLUSTERED INDEX [X_AMBIGSUI_SUI] ON [dbo].[AMBIGSUI]
(
[SUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_AMBIGLUI_LUI ON AMBIGLUI(LUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AMBIGLUI]') AND name = N'X_AMBIGLUI_LUI')
CREATE NONCLUSTERED INDEX [X_AMBIGLUI_LUI] ON [dbo].[AMBIGLUI]
(
[LUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRAUI_CUI2 ON MRAUI(CUI2)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRAUI]') AND name = N'X_MRAUI_CUI2')
CREATE NONCLUSTERED INDEX [X_MRAUI_CUI2] ON [dbo].[MRAUI]
(
[CUI2] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRCUI_CUI2 ON MRCUI(CUI2)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRCUI]') AND name = N'X_MRCUI_CUI2')
CREATE NONCLUSTERED INDEX [X_MRCUI_CUI2] ON [dbo].[MRCUI]
(
[CUI2] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-- CREATE INDEX X_MRMAP_MAPSETCUI ON MRMAP(MAPSETCUI)
-- PCTFREE 10 COMPUTE STATISTICS;
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[MRMAP]') AND name = N'X_MRMAP_MAPSETCUI')
CREATE NONCLUSTERED INDEX [X_MRMAP_MAPSETCUI] ON [dbo].[MRMAP]
(
[MAPSETCUI] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
/* MRCOC not covered by oracle_indexes.sql created by MetaMorphosys for my Hopkins subset.
These remaining indexes were from Dr. Elshehabi's scripts from 2011.
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrcoc]') AND name = N'X_MRCOC_AUI1')
CREATE NONCLUSTERED INDEX [X_MRCOC_AUI1] ON [dbo].[mrcoc]
(
[AUI1] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrcoc]') AND name = N'X_MRCOC_AUI2')
CREATE NONCLUSTERED INDEX [X_MRCOC_AUI2] ON [dbo].[mrcoc]
(
[AUI2] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrcoc]') AND name = N'X_MRCOC_CUI1')
CREATE NONCLUSTERED INDEX [X_MRCOC_CUI1] ON [dbo].[mrcoc]
(
[CUI1] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrcoc]') AND name = N'X_MRCOC_CUI2')
CREATE NONCLUSTERED INDEX [X_MRCOC_CUI2] ON [dbo].[mrcoc]
(
[CUI2] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[mrcoc]') AND name = N'X_MRCOC_SAB')
CREATE NONCLUSTERED INDEX [X_MRCOC_SAB] ON [dbo].[mrcoc]
(
[SAB] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
*/
PRINT('Done creating indexes.');