Commit c1b6da52 authored by Yadd's avatar Yadd

Optimize indexes (#1173)

parent 80b4164d
......@@ -171,7 +171,7 @@ my $tests = {
'DROP INDEX IF EXISTS _s1',
'DROP INDEX IF EXISTS _u1',
'CREATE UNLOGGED TABLE sessions (id varchar(64) not null primary key, a_session text, _whatToTrace text, _session_kind text, _utime bigint)',
'CREATE INDEX uid1 ON sessions (_whatToTrace)',
'CREATE INDEX uid1 ON sessions USING BTREE (_whatToTrace)',
'CREATE INDEX _s1 ON sessions (_session_kind)',
'CREATE INDEX _u1 ON sessions (_utime)',
],
......@@ -190,9 +190,9 @@ my $tests = {
'DROP INDEX IF EXISTS _s1',
'DROP INDEX IF EXISTS _u1',
'CREATE UNLOGGED TABLE sessions (id varchar(64) not null primary key, a_session hstore)',
"CREATE INDEX uid1 ON sessions ( (a_session -> '_whatToTrace') )",
"CREATE INDEX _s1 ON sessions ( (a_session -> '_session_kind') )",
"CREATE INDEX _u1 ON sessions ( (a_session -> '_utime') )",
"CREATE INDEX uid1 ON sessions USING BTREE ( (a_session -> '_whatToTrace') )",
"CREATE INDEX _s1 ON sessions ( (a_session -> '_session_kind') )",
"CREATE INDEX _u1 ON sessions ( ( cast(a_session -> '_utime' AS bigint) ) )",
],
},
PgJSON => {
......@@ -209,9 +209,9 @@ my $tests = {
'DROP INDEX IF EXISTS _s1',
'DROP INDEX IF EXISTS _u1',
'CREATE UNLOGGED TABLE sessions (id varchar(64) not null primary key, a_session json)',
"CREATE INDEX uid1 ON sessions ( (a_session ->> '_whatToTrace') )",
"CREATE INDEX _s1 ON sessions ( (a_session ->> '_session_kind') )",
"CREATE INDEX _u1 ON sessions ( (a_session ->> '_utime') )",
"CREATE INDEX uid1 ON sessions USING BTREE ( (a_session ->> '_whatToTrace') )",
"CREATE INDEX _s1 ON sessions ( (a_session ->> '_session_kind') )",
"CREATE INDEX _u1 ON sessions ( ( cast(a_session ->> '_utime' AS bigint) ) )",
],
},
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment