Subversion Repositories locum

Rev

Rev 132 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
74 jblyberg 1
--
2
-- You need to put something like this in your my.cnf file under [mysqld] :
3
-- 
4
-- max_heap_table_size     = 200M
5
-- init_file               = /path/to/locum_init.sql
6
-- 
23 jblyberg 7
 
74 jblyberg 8
-- Change this to whatever your DB name is
51 jblyberg 9
USE scas;
23 jblyberg 10
 
74 jblyberg 11
-- No need to change anything below here
17 jblyberg 12
DROP TABLE IF EXISTS locum_facet_heap;
103 jblyberg 13
 
149 jblyberg 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';
17 jblyberg 15
ALTER TABLE locum_facet_heap ADD PRIMARY KEY (bnum);
18 jblyberg 16
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (series);
17
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (mat_code);
18
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (loc_code);
19
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (lang);
20
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (pub_year);
98 jblyberg 21
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (pub_decade);
149 jblyberg 22
ALTER TABLE locum_facet_heap ADD INDEX USING BTREE (bib_lastupdate);