Skip to content

Instantly share code, notes, and snippets.

@wkalt
Created August 5, 2014 22:54
Show Gist options
  • Save wkalt/ddbc8243d1874ceff73c to your computer and use it in GitHub Desktop.
Save wkalt/ddbc8243d1874ceff73c to your computer and use it in GitHub Desktop.
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------------------------------
Hash Semi Join (cost=157.17..158.98 rows=6 width=209) (actual time=2.153..2.282 rows=115 loops=1)
Hash Cond: (fs.certname = certnames.name)
-> Sort (cost=104.79..105.08 rows=115 width=219) (actual time=2.076..2.102 rows=115 loops=1)
Sort Key: fp.name, fs.certname
Sort Method: quicksort Memory: 42kB
-> Nested Loop Left Join (cost=62.98..100.86 rows=115 width=219) (actual time=0.335..1.218 rows=115 loops=1)
-> Hash Join (cost=62.83..72.30 rows=115 width=195) (actual time=0.318..0.786 rows=115 loops=1)
Hash Cond: (fv.value_type_id = vt.id)
-> Hash Join (cost=37.52..45.42 rows=115 width=121) (actual time=0.291..0.657 rows=115 loops=1)
Hash Cond: (fv.path_id = fp.id)
-> Hash Join (cost=32.94..39.25 rows=115 width=98) (actual time=0.142..0.398 rows=115 loops=1)
Hash Cond: (f.factset_id = fs.id)
-> Hash Join (cost=3.59..8.32 rows=115 width=66) (actual time=0.126..0.283 rows=115 loops=1)
Hash Cond: (fv.id = f.fact_value_id)
-> Seq Scan on fact_values fv (cost=0.00..3.15 rows=115 width=66) (actual time=0.003..0.042 rows=115 loops=1)
-> Hash (cost=2.15..2.15 rows=115 width=16) (actual time=0.103..0.103 rows=115 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 6kB
-> Seq Scan on facts f (cost=0.00..2.15 rows=115 width=16) (actual time=0.009..0.041 rows=115 loops=1)
-> Hash (cost=18.60..18.60 rows=860 width=48) (actual time=0.008..0.008 rows=1 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 1kB
-> Seq Scan on factsets fs (cost=0.00..18.60 rows=860 width=48) (actual time=0.005..0.005 rows=1 loops=1)
-> Hash (cost=3.15..3.15 rows=115 width=39) (actual time=0.135..0.135 rows=115 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 9kB
-> Seq Scan on fact_paths fp (cost=0.00..3.15 rows=115 width=39) (actual time=0.007..0.067 rows=115 loops=1)
-> Hash (cost=16.80..16.80 rows=680 width=90) (actual time=0.010..0.010 rows=5 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 1kB
-> Seq Scan on value_types vt (cost=0.00..16.80 rows=680 width=90) (actual time=0.003..0.004 rows=5 loops=1)
-> Index Scan using environments_pkey on environments env (cost=0.15..0.23 rows=1 width=40) (actual time=0.001..0.002 rows=1 loops=115)
Index Cond: (fs.environment_id = id)
-> Hash (cost=52.31..52.31 rows=6 width=32) (actual time=0.064..0.064 rows=1 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 1kB
-> Hash Left Join (cost=30.67..52.31 rows=6 width=32) (actual time=0.062..0.063 rows=1 loops=1)
Hash Cond: (certnames.name = reports.certname)
-> Seq Scan on certnames (cost=0.00..21.60 rows=6 width=32) (actual time=0.008..0.008 rows=1 loops=1)
Filter: (deactivated IS NULL)
-> Hash (cost=30.42..30.42 rows=20 width=32) (actual time=0.044..0.044 rows=1 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 1kB
-> Hash Join (cost=27.27..30.42 rows=20 width=32) (actual time=0.040..0.042 rows=1 loops=1)
Hash Cond: ((latest_reports.report)::text = (reports.hash)::text)
-> HashAggregate (cost=16.38..18.38 rows=200 width=98) (actual time=0.011..0.011 rows=1 loops=1)
-> Seq Scan on latest_reports (cost=0.00..15.10 rows=510 width=98) (actual time=0.005..0.006 rows=1 loops=1)
-> Hash (cost=10.40..10.40 rows=40 width=134) (actual time=0.013..0.013 rows=3 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 1kB
-> Seq Scan on reports (cost=0.00..10.40 rows=40 width=134) (actual time=0.006..0.008 rows=3 loops=1)
Total runtime: 2.545 ms
(45 rows)
Time: 13.751 ms
puppetdb=#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment