query-plan-1140

Change label
Query Plan as raw text
Summary
Time Node
Node (ms) Percent
333.303 100.00%
 Sort (cost=5398.43..5398.44 rows=6 width=247) (actual time=331.546..333.303 rows=3555 loops=1)
   Sort Key: specs_sort.num
   Sort Method:  quicksort  Memory: 981kB
315.451 94.64%
   -> Hash Left Join (cost=1087.68..5398.35 rows=6 width=247) (actual time=37.309..315.451 rows=3555 loops=1)
         Hash Cond: (model.company_uid = company.uid)
308.787 92.64%
         -> Hash Left Join (cost=1086.28..5396.86 rows=6 width=217) (actual time=37.235..308.787 rows=3555 loops=1)
               Hash Cond: (logical.uid = specs_sort.logical_uid)
284.832 85.46%
               -> Hash Left Join (cost=694.84..5004.96 rows=6 width=180) (actual time=22.433..284.832 rows=3555 loops=1)
                     Hash Cond: ((logical.type)::integer = type.uid)
273.502 82.06%
                     -> Nested Loop (cost=693.55..5003.62 rows=6 width=168) (actual time=22.361..273.502 rows=3555 loops=1)
237.717 71.32%
                           -> Hash Join (cost=693.55..4953.84 rows=6 width=110) (actual time=22.330..237.717 rows=3555 loops=1)
                                 Hash Cond: (model.logical_uid = spec_find1.logical_uid)
99.289 29.79%
                                 -> Seq Scan on model (cost=0.0..3337.82 rows=184182 width=36) (actual time=0.017..99.289 rows=184182 loops=1)
21.795 6.54%
                                 -> Hash (cost=691.6..691.6 rows=156 width=74) (actual time=21.795..21.795 rows=2196 loops=1)
19.060 5.72%
                                       -> Hash Join (cost=339.84..691.6 rows=156 width=74) (actual time=8.558..19.060 rows=2196 loops=1)
                                             Hash Cond: (spec_find1.logical_uid = spec_find2.logical_uid)
6.765 2.03%
                                             -> Seq Scan on specs spec_find1 (cost=0.0..326.89 rows=1036 width=37) (actual time=0.023..6.765 rows=2196 loops=1)
                                                   Filter: (((text)::text ~~ '%'::text) AND (spec_uid = 8))
8.508 2.55%
                                             -> Hash (cost=326.89..326.89 rows=1036 width=37) (actual time=8.508..8.508 rows=2196 loops=1)
6.667 2.00%
                                                   -> Seq Scan on specs spec_find2 (cost=0.0..326.89 rows=1036 width=37) (actual time=0.010..6.667 rows=2196 loops=1)
                                                         Filter: (((text)::text ~~ '%'::text) AND (spec_uid = 8))
24.885 7.47%
                           -> Index Scan using logical_pkey on logical (cost=0.0..8.28 rows=1 width=58) (actual time=0.006..0.007 rows=1 loops=3555)
                                 Index Cond: (logical.uid = model.logical_uid)
0.024 0.01%
                     -> Hash (cost=1.13..1.13 rows=13 width=12) (actual time=0.024..0.024 rows=13 loops=1)
0.011 0.00%
                           -> Seq Scan on type (cost=0.0..1.13 rows=13 width=12) (actual time=0.004..0.011 rows=13 loops=1)
14.773 4.43%
               -> Hash (cost=287.57..287.57 rows=8309 width=37) (actual time=14.773..14.773 rows=8172 loops=1)
8.206 2.46%
                     -> Seq Scan on specs specs_sort (cost=0.0..287.57 rows=8309 width=37) (actual time=0.012..8.206 rows=8172 loops=1)
                           Filter: (spec_uid = 4)
0.032 0.01%
         -> Hash (cost=1.18..1.18 rows=18 width=30) (actual time=0.032..0.032 rows=18 loops=1)
0.013 0.00%
               -> Seq Scan on company (cost=0.0..1.18 rows=18 width=30) (actual time=0.005..0.013 rows=18 loops=1)
Run-time
0.338389 seconds (338.389 ms)