Subversion Repositories locum

Rev

Rev 132 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 132 Rev 149
Line 9... Line 9...
9
USE scas;
9
USE scas;
10
 
10
 
11
-- No need to change anything below here
11
-- No need to change anything below here
12
DROP TABLE IF EXISTS locum_facet_heap;
12
DROP TABLE IF EXISTS locum_facet_heap;
13
 
13
 
14
CREATE TABLE locum_facet_heap ENGINE=MEMORY CHARACTER SET utf8 COLLATE utf8_general_ci SELECT locum_bib_items.bnum, series, mat_code, loc_code, lang, pub_year, TRUNCATE(pub_year/10,0)*10 AS pub_decade, bib_lastupdate, ages FROM locum_bib_items LEFT JOIN locum_availability ON locum_bib_items.bnum = locum_availability.bnum WHERE active = '1';
14
CREATE TABLE locum_facet_heap ENGINE=MEMORY CHARACTER SET utf8 COLLATE utf8_general_ci SELECT locum_bib_items.bnum, series, mat_code, loc_code, lang, pub_year, TRUNCATE(pub_year/10,0)*10 AS pub_decade, bib_lastupdate FROM locum_bib_items LEFT JOIN locum_availability ON locum_bib_items.bnum = locum_availability.bnum WHERE active = '1';
15
ALTER TABLE locum_facet_heap ADD PRIMARY KEY (bnum);
15
ALTER TABLE locum_facet_heap ADD PRIMARY KEY (bnum);
16
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (series);
16
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (series);
17
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (mat_code);
17
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (mat_code);
18
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (loc_code);
18
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (loc_code);
19
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (lang);
19
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (lang);
20
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (pub_year);
20
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (pub_year);
21
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (pub_decade);
21
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (pub_decade);
22
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (bib_lastupdate);
-
 
23
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (ages);
-
 
24
22
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (bib_lastupdate);
-
 
23
25
24