Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- postgres=# create database test3;
- CREATE DATABASE
- bbazar=# \connect test3;
- SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
- You are now connected to database "test3" as user "postgres".
- test3=# create table test (id bigserial, title character varying);
- NOTICE: CREATE TABLE will create implicit sequence "test_id_seq" for serial column "test.id"
- CREATE TABLE
- test3=# insert into test (title) values ('Testing text');
- INSERT 0 1
- test3=# create extension pg_trgm;
- CREATE EXTENSION
- test3=# create index on test using gin (title gin_trgm_ops);
- CREATE INDEX
- test3=# explain select * from test where title like '%tin%';
- QUERY PLAN
- -----------------------------------------------------
- Seq Scan on test (cost=0.00..1.01 rows=1 width=40)
- Filter: ((title)::text ~~ '%tin%'::text)
- (2 rows)
- test3=#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement