app explain analyze select from push_subscription where client_id 123

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
app=# explain analyze select * from push_subscription where client_id='123';
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Index Scan using push_subscription_client_id_29040d5d on push_subscription (cost=0.56..18.52 rows=16 width=1044) (actual time=0.093..0.093 rows=0 loops=1)
Index Cond: ((client_id)::text = '123'::text)
Planning time: 0.120 ms
Execution time: 0.127 ms
(4 rows)
app=# explain analyze select * from push_subscription where data='123';
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------------------
Gather (cost=1000.00..3237179.90 rows=2 width=1044) (actual time=4159.920..4352.971 rows=0 loops=1)
Workers Planned: 2
Workers Launched: 2
-> Parallel Seq Scan on push_subscription (cost=0.00..3236179.70 rows=1 width=1044) (actual time=4154.648..4154.648 rows=0 loops=3)
Filter: (data = '123'::text)
Rows Removed by Filter: 2595882
Planning time: 0.101 ms
Execution time: 4353.003 ms
(8 rows)