QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------- Nested Loop (cost=2.38..10.93 rows=1 width=93) (actual time=0.501..0.522 rows=1 loops=1) Join Filter: (subplan) -> Hash Join (cost=1.06..2.15 rows=1 width=36) (actual time=0.097..0.109 rows=1 loops=1) Hash Cond: ("outer".id = "inner".devicetype) -> Seq Scan on devicetype dt (cost=0.00..1.05 rows=5 width=36) (actual time=0.003..0.009 rows=5 loops=1) -> Hash (cost=1.06..1.06 rows=1 width=36) (actual time=0.037..0.037 rows=0 loops=1) -> Seq Scan on device d (cost=0.00..1.06 rows=1 width=36) (actual time=0.018..0.021 rows=1 loops=1) Filter: ((name)::text = 'perftoolBAS'::text) -> Hash Join (cost=1.31..6.11 rows=2 width=129) (actual time=0.172..0.253 rows=2 loops=1) Hash Cond: ("outer".devicerule = "inner".id) -> Seq Scan on devicescript ds (cost=0.00..4.55 rows=44 width=165) (actual time=0.007..0.074 rows=44 loops=1) Filter: ((scripttype)::text = 'CLI'::text) -> Hash (cost=1.31..1.31 rows=1 width=36) (actual time=0.065..0.065 rows=0 loops=1) -> Seq Scan on devicerule dr (cost=0.00..1.31 rows=1 width=36) (actual time=0.008..0.021 rows=1 loops=1) Filter: ((name)::text = '256k_downstream'::text) SubPlan -> Seq Scan on devicescript_devicetype dsdt (cost=0.00..2.62 rows=10 width=36) (actual time=0.005..0.053 rows=18 loops=2) Filter: (possession = $0) Total runtime: 0.647 ms (19 rows) QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- Hash Join (cost=2.16..3.25 rows=1 width=334) (actual time=0.084..0.096 rows=1 loops=1) Hash Cond: ("outer".id = "inner".devicetype) -> Seq Scan on devicetype dt (cost=0.00..1.05 rows=5 width=67) (actual time=0.002..0.007 rows=5 loops=1) -> Hash (cost=2.16..2.16 rows=1 width=339) (actual time=0.066..0.066 rows=0 loops=1) -> Hash Join (cost=1.06..2.16 rows=1 width=339) (actual time=0.047..0.062 rows=1 loops=1) Hash Cond: ("outer".device = "inner".id) -> Seq Scan on mgmtprotocol mp (cost=0.00..1.06 rows=5 width=327) (actual time=0.004..0.010 rows=5 loops=1) Filter: (("type")::text = 'CLI'::text) -> Hash (cost=1.06..1.06 rows=1 width=84) (actual time=0.024..0.024 rows=0 loops=1) -> Seq Scan on device d (cost=0.00..1.06 rows=1 width=84) (actual time=0.017..0.019 rows=1 loops=1) Filter: ((ipaddress)::text = '10.1.10.60'::text) Total runtime: 0.176 ms (12 rows) QUERY PLAN ----------------------------------------------------------------------------------------------------------------------- Hash Join (cost=1.31..3.77 rows=2 width=16) (actual time=0.117..0.174 rows=1 loops=1) Hash Cond: ("outer".devicerule = "inner".id) -> Seq Scan on devruleparameter drp (cost=0.00..2.29 rows=29 width=52) (actual time=0.004..0.034 rows=29 loops=1) -> Hash (cost=1.31..1.31 rows=1 width=36) (actual time=0.035..0.035 rows=0 loops=1) -> Seq Scan on devicerule dr (cost=0.00..1.31 rows=1 width=36) (actual time=0.016..0.030 rows=1 loops=1) Filter: ((name)::text = '256k_downstream'::text) Total runtime: 0.221 ms (7 rows) QUERY PLAN -------------------------------------------------------------------------------------------------------------------- Hash Join (cost=1.06..2.15 rows=1 width=14) (actual time=0.053..0.053 rows=0 loops=1) Hash Cond: ("outer".devicetype = "inner".id) -> Seq Scan on device d (cost=0.00..1.05 rows=5 width=50) (actual time=0.002..0.008 rows=5 loops=1) -> Hash (cost=1.06..1.06 rows=1 width=36) (actual time=0.017..0.017 rows=0 loops=1) -> Seq Scan on devicetype dt (cost=0.00..1.06 rows=1 width=36) (actual time=0.015..0.015 rows=0 loops=1) Filter: ((vendor)::text = 'P-Cube'::text) Total runtime: 0.102 ms (7 rows)