File: moc_options.sql

package info (click to toggle)
pgsphere 1.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,084 kB
  • sloc: ansic: 13,927; sql: 6,894; cpp: 853; makefile: 275; perl: 168; yacc: 145; python: 106; lex: 55; xml: 51; sh: 1
file content (14 lines) | stat: -rw-r--r-- 649 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
create table moc_opt (m smoc);
insert into moc_opt select format('9/%s', i)::smoc from generate_series(1, 1000) g(i);
analyze moc_opt;

create index moc_opt5 on moc_opt using gin (m);
explain (analyze, costs off, timing off, summary off) select * from moc_opt where m && '9/1';
drop index moc_opt5;

create index moc_opt8 on moc_opt using gin (m smoc_gin_ops_fine);
explain (analyze, costs off, timing off, summary off) select * from moc_opt where m && '9/1';
drop index moc_opt8;

create index moc_opt9 on moc_opt using gin (m smoc_gin_ops (order = 9));
explain (analyze, costs off, timing off, summary off) select * from moc_opt where m && '9/1';