Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P195
(An Untitled Masterwork)
Active
Public
Actions
Authored by
zack
on Nov 17 2017, 2:16 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
scaramouche ~ psql service=swh-replica
psql (10.1, server 10.0)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.
softwareheritage=> \d origin
Table "public.origin"
Column | Type | Collation | Nullable | Default
---------+--------+-----------+----------+------------------------------------
id | bigint | | not null | nextval('origin_id_seq'::regclass)
type | text | | |
url | text | | not null |
lister | uuid | | |
project | uuid | | |
Indexes:
"origin_pkey" UNIQUE, btree (id)
"origin_type_url_idx" btree (type, url)
"origin_url_idx" gin (url gin_trgm_ops)
softwareheritage=> explain select id from origin where url='foo';
QUERY PLAN
---------------------------------------------------------------------------
Gather (cost=1000.00..1047680.56 rows=1 width=8)
Workers Planned: 2
-> Parallel Seq Scan on origin (cost=0.00..1046680.46 rows=1 width=8)
Filter: (url = 'foo'::text)
(4 rows)
softwareheritage=> explain select id from origin where url like '%foo%';
QUERY PLAN
-------------------------------------------------------------------------------------
Bitmap Heap Scan on origin (cost=5648.60..555112.94 rows=663045 width=8)
Recheck Cond: (url ~~ '%foo%'::text)
-> Bitmap Index Scan on origin_url_idx (cost=0.00..5482.84 rows=663045 width=0)
Index Cond: (url ~~ '%foo%'::text)
(4 rows)
softwareheritage=>
Event Timeline
zack
created this paste.
Nov 17 2017, 2:16 PM
2017-11-17 14:16:57 (UTC+1)
Log In to Comment