All pastes #2084155 Raw Edit

Pinaraf

public sql v1 · immutable
#2084155 ·published 2011-09-28 20:24 UTC
rendered paste body
DROP TABLE toto;CREATE TABLE toto (id integer, h hstore);INSERT INTO toto SELECT cast( random() * 1000 as integer) as i,                        hstore(cast(cast( random() * 1000 as integer) as text), 'a')                 FROM generate_series(1,10000);CREATE INDEX idx_toto_h ON toto USING gist(h);ANALYZE toto;EXPLAIN SELECT * from toto where h ? '500';