Created
August 26, 2016 11:30
-
-
Save whitequark/4a26952a116371e528c00801397f7e88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS irclog; | |
CREATE TABLE irclog ( | |
id SERIAL, | |
channel VARCHAR(30), | |
nick VARCHAR(40), | |
opcode VARCHAR(20), | |
timestamp INT, | |
line TEXT, | |
oper_nick VARCHAR(40), | |
payload TEXT, | |
PRIMARY KEY(id) | |
); | |
CREATE INDEX irclog_channel ON irclog (channel); | |
CREATE INDEX irclog_channel_timestamp_index ON irclog (channel, timestamp); | |
CREATE INDEX irclog_channel_opcode_index ON irclog (channel, opcode); | |
CREATE INDEX irclog_channel_nick_index ON irclog (channel, nick); | |
CREATE INDEX irclog_fulltext_index ON irclog | |
USING gin(to_tsvector('english', nick || ' ' || line)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment