Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
LOG: duration: 0.072 ms plan:
Query Text: SELECT 1
FROM certnames
WHERE certname=$1
Index Only Scan using certnames_transform_certname_key on certnames (cost=0.41..8.43 rows=1 width=4) (actual time=0.060..0.068 rows=1 loops=1)
Index Cond: (certname = 'noway.corp.puppetlabs.net'::text)
Heap Fetches: 2
Buffers: shared hit=5
LOG: duration: 6.828 ms plan:
Query Text: WITH inactive_nodes AS (SELECT certname FROM certnames WHERE (deactivated IS NOT NULL OR expired IS NOT NULL)) SELECT fs.certname AS certname, fp.name AS name, f.value AS value, env.environment AS environment FROM factsets fs INNER JOIN facts f ON fs.id = f.factset_id INNER JOIN fact_paths fp ON f.fact_path_id = fp.id INNER JOIN value_types vt ON vt.id = f.value_type_id LEFT JOIN environments env ON fs.environment_id = env.id WHERE (fp.depth = 0 AND ((fs.certname = $1) AND NOT ((fs.certname) in ( (SELECT inactive_nodes.certname AS certname FROM inactive_nodes) ) )))
Hash Join (cost=1239.63..2152.17 rows=109 width=92) (actual time=6.582..6.703 rows=104 loops=1)
Hash Cond: (f.fact_path_id = fp.id)
Buffers: shared hit=746
CTE inactive_nodes
-> Seq Scan on certnames (cost=0.00..1224.73 rows=1 width=10) (actual time=6.340..6.340 rows=0 loops=1)
Filter: ((deactivated IS NOT NULL) OR (expired IS NOT NULL))
Rows Removed by Filter: 49473
Buffers: shared hit=730
-> Hash Join (cost=7.94..918.91 rows=128 width=87) (actual time=6.465..6.555 rows=119 loops=1)
Hash Cond: (f.value_type_id = vt.id)
Buffers: shared hit=744
-> Nested Loop (cost=6.80..916.02 rows=128 width=95) (actual time=6.445..6.501 rows=119 loops=1)
Buffers: shared hit=743
-> Nested Loop Left Join (cost=0.59..16.64 rows=1 width=50) (actual time=6.400..6.402 rows=1 loops=1)
Buffers: shared hit=736
-> Index Scan using factsets_certname_idx on factsets fs (cost=0.44..8.46 rows=1 width=26) (actual time=6.391..6.392 rows=1 loops=1)
Index Cond: (certname = ($1)::text)
Filter: (NOT (hashed SubPlan 2))
Buffers: shared hit=734
SubPlan 2
-> CTE Scan on inactive_nodes (cost=0.00..0.02 rows=1 width=32) (actual time=6.342..6.342 rows=0 loops=1)
Buffers: shared hit=730
-> Index Scan using environments_pkey on environments env (cost=0.15..8.17 rows=1 width=40) (actual time=0.005..0.006 rows=1 loops=1)
Index Cond: (fs.environment_id = id)
Buffers: shared hit=2
-> Bitmap Heap Scan on facts f (cost=6.21..897.08 rows=230 width=61) (actual time=0.039..0.062 rows=119 loops=1)
Recheck Cond: (factset_id = fs.id)
Heap Blocks: exact=4
Buffers: shared hit=7
-> Bitmap Index Scan on facts_factset_id_fact_path_id (cost=0.00..6.16 rows=230 width=0) (actual time=0.030..0.030 rows=126 loops=1)
Index Cond: (factset_id = fs.id)
Buffers: shared hit=3
-> Hash (cost=1.06..1.06 rows=6 width=8) (actual time=0.007..0.007 rows=6 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 9kB
Buffers: shared hit=1
-> Seq Scan on value_types vt (cost=0.00..1.06 rows=6 width=8) (actual time=0.005..0.006 rows=6 loops=1)
Buffers: shared hit=1
-> Hash (cost=4.68..4.68 rows=183 width=21) (actual time=0.102..0.102 rows=161 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 18kB
Buffers: shared hit=2
-> Seq Scan on fact_paths fp (cost=0.00..4.68 rows=183 width=21) (actual time=0.014..0.057 rows=161 loops=1)
Filter: (depth = 0)
Rows Removed by Filter: 34
Buffers: shared hit=2
LOG: duration: 0.043 ms plan:
Query Text: SELECT 1 FROM certnames WHERE certname=$1 LIMIT 1
Limit (cost=0.41..8.43 rows=1 width=4) (actual time=0.038..0.038 rows=1 loops=1)
Buffers: shared hit=5
-> Index Only Scan using certnames_transform_certname_key on certnames (cost=0.41..8.43 rows=1 width=4) (actual time=0.038..0.038 rows=1 loops=1)
Index Cond: (certname = ($1)::text)
Heap Fetches: 1
Buffers: shared hit=5
LOG: duration: 0.037 ms plan:
Query Text: UPDATE certnames SET deactivated = NULL,expired = NULL WHERE certname=$1 AND (deactivated<$2 OR expired<$3)
Update on certnames (cost=0.41..8.44 rows=1 width=85) (actual time=0.037..0.037 rows=0 loops=1)
Buffers: shared hit=4
-> Index Scan using certnames_transform_certname_key on certnames (cost=0.41..8.44 rows=1 width=85) (actual time=0.036..0.036 rows=0 loops=1)
Index Cond: (certname = ($1)::text)
Filter: ((deactivated < $2) OR (expired < $3))
Rows Removed by Filter: 1
Buffers: shared hit=4
LOG: duration: 0.057 ms plan:
Query Text: SELECT producer_timestamp FROM factsets WHERE certname = $1 ORDER BY producer_timestamp DESC LIMIT 1
Limit (cost=8.44..8.45 rows=1 width=8) (actual time=0.050..0.050 rows=1 loops=1)
Buffers: shared hit=4
-> Sort (cost=8.44..8.45 rows=1 width=8) (actual time=0.050..0.050 rows=1 loops=1)
Sort Key: producer_timestamp DESC
Sort Method: quicksort Memory: 25kB
Buffers: shared hit=4
-> Index Scan using factsets_certname_idx on factsets (cost=0.41..8.43 rows=1 width=8) (actual time=0.029..0.030 rows=1 loops=1)
Index Cond: (certname = 'noway.corp.puppetlabs.net'::text)
Buffers: shared hit=4
LOG: duration: 0.306 ms plan:
Query Text: select path, id, value_type_id, large_value_hash, case when large_value_hash is null and value_type_id = 5 then value end as value, case when large_value_hash is null then value_string end as value_string, value_integer, value_float, value_boolean from facts as f inner join fact_paths fp on f.fact_path_id = fp.id where f.factset_id = $1
Merge Join (cost=0.58..887.82 rows=226 width=133) (actual time=0.024..0.197 rows=119 loops=1)
Merge Cond: (fp.id = f.fact_path_id)
Buffers: shared hit=56
-> Index Scan using fact_paths_pkey on fact_paths fp (cost=0.14..16.36 rows=214 width=23) (actual time=0.006..0.030 rows=120 loops=1)
Buffers: shared hit=3
-> Index Scan using facts_factset_id_fact_path_id on facts f (cost=0.43..903.53 rows=226 width=116) (actual time=0.012..0.067 rows=119 loops=1)
Index Cond: (factset_id = '1'::bigint)
Buffers: shared hit=53
LOG: duration: 0.087 ms plan:
Query Text: SELECT fs.id as factset_id, c.id as certname_id, encode(c.package_hash::bytea, 'hex') as package_hash
FROM factsets fs, certnames c
WHERE fs.certname = $1 AND c.certname = $2
Nested Loop (cost=0.83..16.88 rows=1 width=48) (actual time=0.078..0.080 rows=1 loops=1)
Buffers: shared hit=8
-> Index Scan using factsets_certname_idx on factsets fs (cost=0.41..8.43 rows=1 width=8) (actual time=0.039..0.040 rows=1 loops=1)
Index Cond: (certname = 'noway.corp.puppetlabs.net'::text)
Buffers: shared hit=4
-> Index Scan using certnames_transform_certname_key on certnames c (cost=0.41..8.43 rows=1 width=29) (actual time=0.034..0.034 rows=1 loops=1)
Index Cond: (certname = 'noway.corp.puppetlabs.net'::text)
Buffers: shared hit=4
LOG: duration: 0.059 ms plan:
Query Text: update facts set value_type_id = $1, large_value_hash = $2, value = $3, value_string = $4, value_integer = $5, value_float = $6, value_boolean = $7 where factset_id = $8 and fact_path_id = $9
Update on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.057..0.057 rows=0 loops=1)
Buffers: shared hit=6
-> Index Scan using facts_factset_id_fact_path_id on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.015..0.016 rows=1 loops=1)
Index Cond: ((factset_id = '1'::bigint) AND (fact_path_id = '12'::bigint))
Buffers: shared hit=4
LOG: duration: 0.089 ms plan:
Query Text: update facts set value_type_id = $1, large_value_hash = $2, value = $3, value_string = $4, value_integer = $5, value_float = $6, value_boolean = $7 where factset_id = $8 and fact_path_id = $9
Update on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.089..0.089 rows=0 loops=1)
Buffers: shared hit=25
-> Index Scan using facts_factset_id_fact_path_id on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.011..0.011 rows=1 loops=1)
Index Cond: ((factset_id = '1'::bigint) AND (fact_path_id = '27'::bigint))
Buffers: shared hit=4
LOG: duration: 0.022 ms plan:
Query Text: update facts set value_type_id = $1, large_value_hash = $2, value = $3, value_string = $4, value_integer = $5, value_float = $6, value_boolean = $7 where factset_id = $8 and fact_path_id = $9
Update on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.022..0.022 rows=0 loops=1)
Buffers: shared hit=6
-> Index Scan using facts_factset_id_fact_path_id on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.010..0.010 rows=1 loops=1)
Index Cond: ((factset_id = '1'::bigint) AND (fact_path_id = '36'::bigint))
Buffers: shared hit=4
LOG: duration: 0.071 ms plan:
Query Text: update facts set value_type_id = $1, large_value_hash = $2, value = $3, value_string = $4, value_integer = $5, value_float = $6, value_boolean = $7 where factset_id = $8 and fact_path_id = $9
Update on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.070..0.070 rows=0 loops=1)
Buffers: shared hit=26
-> Index Scan using facts_factset_id_fact_path_id on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.010..0.011 rows=1 loops=1)
Index Cond: ((factset_id = '1'::bigint) AND (fact_path_id = '43'::bigint))
Buffers: shared hit=4
LOG: duration: 0.021 ms plan:
Query Text: update facts set value_type_id = $1, large_value_hash = $2, value = $3, value_string = $4, value_integer = $5, value_float = $6, value_boolean = $7 where factset_id = $8 and fact_path_id = $9
Update on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.021..0.021 rows=0 loops=1)
Buffers: shared hit=6
-> Index Scan using facts_factset_id_fact_path_id on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.010..0.011 rows=1 loops=1)
Index Cond: ((factset_id = '1'::bigint) AND (fact_path_id = '46'::bigint))
Buffers: shared hit=4
LOG: duration: 0.023 ms plan:
Query Text: update facts set value_type_id = $1, large_value_hash = $2, value = $3, value_string = $4, value_integer = $5, value_float = $6, value_boolean = $7 where factset_id = $8 and fact_path_id = $9
Update on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.022..0.022 rows=0 loops=1)
Buffers: shared hit=6
-> Index Scan using facts_factset_id_fact_path_id on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.009..0.010 rows=1 loops=1)
Index Cond: ((factset_id = '1'::bigint) AND (fact_path_id = '48'::bigint))
Buffers: shared hit=4
LOG: duration: 0.022 ms plan:
Query Text: update facts set value_type_id = $1, large_value_hash = $2, value = $3, value_string = $4, value_integer = $5, value_float = $6, value_boolean = $7 where factset_id = $8 and fact_path_id = $9
Update on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.021..0.021 rows=0 loops=1)
Buffers: shared hit=6
-> Index Scan using facts_factset_id_fact_path_id on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.010..0.011 rows=1 loops=1)
Index Cond: ((factset_id = '1'::bigint) AND (fact_path_id = '72'::bigint))
Buffers: shared hit=4
LOG: duration: 0.062 ms plan:
Query Text: update facts set value_type_id = $1, large_value_hash = $2, value = $3, value_string = $4, value_integer = $5, value_float = $6, value_boolean = $7 where factset_id = $8 and fact_path_id = $9
Update on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.061..0.061 rows=0 loops=1)
Buffers: shared hit=25
-> Index Scan using facts_factset_id_fact_path_id on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.009..0.009 rows=1 loops=1)
Index Cond: ((factset_id = '1'::bigint) AND (fact_path_id = '87'::bigint))
Buffers: shared hit=4
LOG: duration: 0.067 ms plan:
Query Text: update facts set value_type_id = $1, large_value_hash = $2, value = $3, value_string = $4, value_integer = $5, value_float = $6, value_boolean = $7 where factset_id = $8 and fact_path_id = $9
Update on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.066..0.066 rows=0 loops=1)
Buffers: shared hit=25
-> Index Scan using facts_factset_id_fact_path_id on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.010..0.011 rows=1 loops=1)
Index Cond: ((factset_id = '1'::bigint) AND (fact_path_id = '90'::bigint))
Buffers: shared hit=4
LOG: duration: 0.020 ms plan:
Query Text: update facts set value_type_id = $1, large_value_hash = $2, value = $3, value_string = $4, value_integer = $5, value_float = $6, value_boolean = $7 where factset_id = $8 and fact_path_id = $9
Update on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.020..0.020 rows=0 loops=1)
Buffers: shared hit=6
-> Index Scan using facts_factset_id_fact_path_id on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.010..0.011 rows=1 loops=1)
Index Cond: ((factset_id = '1'::bigint) AND (fact_path_id = '106'::bigint))
Buffers: shared hit=4
LOG: duration: 0.071 ms plan:
Query Text: update facts set value_type_id = $1, large_value_hash = $2, value = $3, value_string = $4, value_integer = $5, value_float = $6, value_boolean = $7 where factset_id = $8 and fact_path_id = $9
Update on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.071..0.071 rows=0 loops=1)
Buffers: shared hit=25
-> Index Scan using facts_factset_id_fact_path_id on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.010..0.011 rows=1 loops=1)
Index Cond: ((factset_id = '1'::bigint) AND (fact_path_id = '119'::bigint))
Buffers: shared hit=4
LOG: duration: 0.065 ms plan:
Query Text: update facts set value_type_id = $1, large_value_hash = $2, value = $3, value_string = $4, value_integer = $5, value_float = $6, value_boolean = $7 where factset_id = $8 and fact_path_id = $9
Update on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.065..0.065 rows=0 loops=1)
Buffers: shared hit=26
-> Index Scan using facts_factset_id_fact_path_id on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.010..0.011 rows=1 loops=1)
Index Cond: ((factset_id = '1'::bigint) AND (fact_path_id = '130'::bigint))
Buffers: shared hit=4
LOG: duration: 0.066 ms plan:
Query Text: update facts set value_type_id = $1, large_value_hash = $2, value = $3, value_string = $4, value_integer = $5, value_float = $6, value_boolean = $7 where factset_id = $8 and fact_path_id = $9
Update on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.064..0.064 rows=0 loops=1)
Buffers: shared hit=25
-> Index Scan using facts_factset_id_fact_path_id on facts (cost=0.43..12.43 rows=2 width=143) (actual time=0.010..0.011 rows=1 loops=1)
Index Cond: ((factset_id = '1'::bigint) AND (fact_path_id = '136'::bigint))
Buffers: shared hit=4
LOG: duration: 0.017 ms plan:
Query Text: select id from environments where environment=$1
Index Scan using environments_name_key on environments (cost=0.15..8.17 rows=1 width=8) (actual time=0.012..0.012 rows=1 loops=1)
Index Cond: (environment = ($1)::text)
Buffers: shared hit=2
LOG: duration: 0.035 ms plan:
Query Text: select id from producers where name=$1
Seq Scan on producers (cost=0.00..1.76 rows=1 width=8) (actual time=0.013..0.031 rows=1 loops=1)
Filter: (name = ($1)::text)
Rows Removed by Filter: 71
Buffers: shared hit=1
LOG: duration: 0.786 ms plan:
Query Text: UPDATE factsets SET timestamp = $1,environment_id = $2,producer_timestamp = $3,hash = $4,producer_id = $5 WHERE id=$6
Update on factsets (cost=0.29..8.31 rows=1 width=88) (actual time=0.785..0.785 rows=0 loops=1)
Buffers: shared hit=17 read=2 dirtied=1
-> Index Scan using factsets_pkey on factsets (cost=0.29..8.31 rows=1 width=88) (actual time=0.013..0.016 rows=1 loops=1)
Index Cond: (id = '1'::bigint)
Buffers: shared hit=4
LOG: duration: 0.037 ms plan:
Query Text: SELECT 1
FROM certnames
WHERE certname=$1
Index Only Scan using certnames_transform_certname_key on certnames (cost=0.41..8.43 rows=1 width=4) (actual time=0.033..0.034 rows=1 loops=1)
Index Cond: (certname = 'noway.corp.puppetlabs.net'::text)
Heap Fetches: 1
Buffers: shared hit=5
LOG: duration: 7.389 ms plan:
Query Text: WITH inactive_nodes AS (SELECT certname FROM certnames WHERE (deactivated IS NOT NULL OR expired IS NOT NULL)) SELECT fs.certname AS certname, fp.name AS name, f.value AS value, env.environment AS environment FROM factsets fs INNER JOIN facts f ON fs.id = f.factset_id INNER JOIN fact_paths fp ON f.fact_path_id = fp.id INNER JOIN value_types vt ON vt.id = f.value_type_id LEFT JOIN environments env ON fs.environment_id = env.id WHERE (fp.depth = 0 AND ((fs.certname = $1) AND NOT ((fs.certname) in ( (SELECT inactive_nodes.certname AS certname FROM inactive_nodes) ) )))
Hash Join (cost=1239.63..2152.17 rows=109 width=92) (actual time=7.127..7.274 rows=104 loops=1)
Hash Cond: (f.fact_path_id = fp.id)
Buffers: shared hit=747
CTE inactive_nodes
-> Seq Scan on certnames (cost=0.00..1224.73 rows=1 width=10) (actual time=6.806..6.806 rows=0 loops=1)
Filter: ((deactivated IS NOT NULL) OR (expired IS NOT NULL))
Rows Removed by Filter: 49473
Buffers: shared hit=730
-> Hash Join (cost=7.94..918.91 rows=128 width=87) (actual time=6.964..7.070 rows=119 loops=1)
Hash Cond: (f.value_type_id = vt.id)
Buffers: shared hit=745
-> Nested Loop (cost=6.80..916.02 rows=128 width=95) (actual time=6.926..6.995 rows=119 loops=1)
Buffers: shared hit=744
-> Nested Loop Left Join (cost=0.59..16.64 rows=1 width=50) (actual time=6.894..6.899 rows=1 loops=1)
Buffers: shared hit=737
-> Index Scan using factsets_certname_idx on factsets fs (cost=0.44..8.46 rows=1 width=26) (actual time=6.884..6.887 rows=1 loops=1)
Index Cond: (certname = ($1)::text)
Filter: (NOT (hashed SubPlan 2))
Buffers: shared hit=735
SubPlan 2
-> CTE Scan on inactive_nodes (cost=0.00..0.02 rows=1 width=32) (actual time=6.807..6.807 rows=0 loops=1)
Buffers: shared hit=730
-> Index Scan using environments_pkey on environments env (cost=0.15..8.17 rows=1 width=40) (actual time=0.006..0.007 rows=1 loops=1)
Index Cond: (fs.environment_id = id)
Buffers: shared hit=2
-> Bitmap Heap Scan on facts f (cost=6.21..897.08 rows=230 width=61) (actual time=0.025..0.067 rows=119 loops=1)
Recheck Cond: (factset_id = fs.id)
Heap Blocks: exact=4
Buffers: shared hit=7
-> Bitmap Index Scan on facts_factset_id_fact_path_id (cost=0.00..6.16 rows=230 width=0) (actual time=0.018..0.018 rows=126 loops=1)
Index Cond: (factset_id = fs.id)
Buffers: shared hit=3
-> Hash (cost=1.06..1.06 rows=6 width=8) (actual time=0.011..0.011 rows=6 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 9kB
Buffers: shared hit=1
-> Seq Scan on value_types vt (cost=0.00..1.06 rows=6 width=8) (actual time=0.007..0.009 rows=6 loops=1)
Buffers: shared hit=1
-> Hash (cost=4.68..4.68 rows=183 width=21) (actual time=0.151..0.151 rows=161 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 18kB
Buffers: shared hit=2
-> Seq Scan on fact_paths fp (cost=0.00..4.68 rows=183 width=21) (actual time=0.017..0.094 rows=161 loops=1)
Filter: (depth = 0)
Rows Removed by Filter: 34
Buffers: shared hit=2
LOG: duration: 0.063 ms plan:
Query Text: SELECT 1 FROM certnames WHERE certname=$1 LIMIT 1
Limit (cost=0.41..8.43 rows=1 width=4) (actual time=0.058..0.059 rows=1 loops=1)
Buffers: shared hit=5
-> Index Only Scan using certnames_transform_certname_key on certnames (cost=0.41..8.43 rows=1 width=4) (actual time=0.057..0.057 rows=1 loops=1)
Index Cond: (certname = ($1)::text)
Heap Fetches: 1
Buffers: shared hit=5
LOG: duration: 0.049 ms plan:
Query Text: UPDATE certnames SET deactivated = NULL,expired = NULL WHERE certname=$1 AND (deactivated<$2 OR expired<$3)
Update on certnames (cost=0.41..8.44 rows=1 width=85) (actual time=0.047..0.047 rows=0 loops=1)
Buffers: shared hit=4
-> Index Scan using certnames_transform_certname_key on certnames (cost=0.41..8.44 rows=1 width=85) (actual time=0.047..0.047 rows=0 loops=1)
Index Cond: (certname = ($1)::text)
Filter: ((deactivated < $2) OR (expired < $3))
Rows Removed by Filter: 1
Buffers: shared hit=4
LOG: duration: 0.072 ms plan:
Query Text: select catalogs.id as catalog_id, certnames.id as certname_id,
encode(catalogs.hash::bytea, 'hex') as catalog_hash, catalogs.producer_timestamp
from certnames
left join catalogs on catalogs.certname=certnames.certname
where certnames.certname=$1
Nested Loop Left Join (cost=0.83..16.88 rows=1 width=56) (actual time=0.062..0.064 rows=1 loops=1)
Join Filter: (catalogs.certname = certnames.certname)
Buffers: shared hit=9
-> Index Scan using certnames_transform_certname_key on certnames (cost=0.41..8.43 rows=1 width=18) (actual time=0.026..0.026 rows=1 loops=1)
Index Cond: (certname = 'noway.corp.puppetlabs.net'::text)
Buffers: shared hit=4
-> Index Scan using catalogs_certname_idx on catalogs (cost=0.41..8.43 rows=1 width=47) (actual time=0.031..0.032 rows=1 loops=1)
Index Cond: (certname = 'noway.corp.puppetlabs.net'::text)
Buffers: shared hit=5
LOG: duration: 0.014 ms plan:
Query Text: select id from environments where environment=$1
Index Scan using environments_name_key on environments (cost=0.15..8.17 rows=1 width=8) (actual time=0.010..0.011 rows=1 loops=1)
Index Cond: (environment = ($1)::text)
Buffers: shared hit=2
LOG: duration: 0.037 ms plan:
Query Text: select id from producers where name=$1
Seq Scan on producers (cost=0.00..1.76 rows=1 width=8) (actual time=0.016..0.032 rows=1 loops=1)
Filter: (name = ($1)::text)
Rows Removed by Filter: 71
Buffers: shared hit=1
LOG: duration: 17.478 ms plan:
Query Text: UPDATE catalogs SET environment_id = $1,catalog_uuid = $2,hash = $3,transaction_uuid = $4,producer_timestamp = $5,producer_id = $6,catalog_version = $7,api_version = $8,code_id = NULL,timestamp = $9,job_id = NULL WHERE id=$10
Update on catalogs (cost=0.29..8.31 rows=1 width=228) (actual time=17.477..17.477 rows=0 loops=1)
Buffers: shared hit=25 read=4 dirtied=4
-> Index Scan using catalogs_pkey on catalogs (cost=0.29..8.31 rows=1 width=228) (actual time=0.012..0.015 rows=1 loops=1)
Index Cond: (id = '1'::bigint)
Buffers: shared hit=4
LOG: duration: 0.037 ms plan:
Query Text: SELECT 1 FROM certnames WHERE certname=$1 LIMIT 1
Limit (cost=0.41..8.43 rows=1 width=4) (actual time=0.033..0.034 rows=1 loops=1)
Buffers: shared hit=5
-> Index Only Scan using certnames_transform_certname_key on certnames (cost=0.41..8.43 rows=1 width=4) (actual time=0.033..0.033 rows=1 loops=1)
Index Cond: (certname = ($1)::text)
Heap Fetches: 1
Buffers: shared hit=5
LOG: duration: 0.048 ms plan:
Query Text: UPDATE certnames SET deactivated = NULL,expired = NULL WHERE certname=$1 AND (deactivated<$2 OR expired<$3)
Update on certnames (cost=0.41..8.44 rows=1 width=85) (actual time=0.047..0.047 rows=0 loops=1)
Buffers: shared hit=4
-> Index Scan using certnames_transform_certname_key on certnames (cost=0.41..8.44 rows=1 width=85) (actual time=0.046..0.046 rows=0 loops=1)
Index Cond: (certname = ($1)::text)
Filter: ((deactivated < $2) OR (expired < $3))
Rows Removed by Filter: 1
Buffers: shared hit=4
LOG: duration: 16.705 ms plan:
Query Text: select 1 from reports where encode(hash, 'hex'::text) = $1 limit 1
Limit (cost=0.42..8.44 rows=1 width=4) (actual time=16.703..16.703 rows=0 loops=1)
Buffers: shared hit=1 read=2
-> Index Scan using reports_hash_expr_idx on reports (cost=0.42..8.44 rows=1 width=4) (actual time=16.702..16.702 rows=0 loops=1)
Index Cond: (encode(hash, 'hex'::text) = '7707eb834c75522bd2421d6b50daa58f2bac7075'::text)
Buffers: shared hit=1 read=2
LOG: duration: 0.034 ms plan:
Query Text: select id from certnames where certname=$1
Index Scan using certnames_transform_certname_key on certnames (cost=0.41..8.43 rows=1 width=8) (actual time=0.031..0.031 rows=1 loops=1)
Index Cond: (certname = 'noway.corp.puppetlabs.net'::text)
Buffers: shared hit=4
LOG: duration: 0.015 ms plan:
Query Text: select id from report_statuses where status=$1
Seq Scan on report_statuses (cost=0.00..1.04 rows=1 width=8) (actual time=0.011..0.013 rows=1 loops=1)
Filter: (status = 'unchanged'::text)
Rows Removed by Filter: 2
Buffers: shared hit=1
LOG: duration: 0.013 ms plan:
Query Text: select id from environments where environment=$1
Index Scan using environments_name_key on environments (cost=0.15..8.17 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=1)
Index Cond: (environment = ($1)::text)
Buffers: shared hit=2
LOG: duration: 0.042 ms plan:
Query Text: select id from producers where name=$1
Seq Scan on producers (cost=0.00..1.76 rows=1 width=8) (actual time=0.019..0.036 rows=1 loops=1)
Filter: (name = ($1)::text)
Rows Removed by Filter: 71
Buffers: shared hit=1
LOG: duration: 1.925 ms plan:
Query Text: INSERT INTO reports ( status_id, environment_id, catalog_uuid, receive_time, hash, transaction_uuid, puppet_version, noop, logs, report_format, start_time, producer_timestamp, cached_catalog_status, end_time, producer_id, configuration_version, code_id, noop_pending, certname, metrics, job_id ) VALUES ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21 ) RETURNING *
Insert on reports (cost=0.00..0.01 rows=1 width=1453) (actual time=1.619..1.619 rows=1 loops=1)
Buffers: shared hit=32 read=6 dirtied=5
-> Result (cost=0.00..0.01 rows=1 width=1453) (actual time=0.008..0.008 rows=1 loops=1)
Buffers: shared hit=1
LOG: duration: 0.207 ms plan:
Query Text: UPDATE certnames SET latest_report_id = $1,latest_report_timestamp = $2 WHERE certname = $3 AND latest_report_timestamp < $4
Update on certnames (cost=0.41..8.43 rows=1 width=85) (actual time=0.074..0.074 rows=0 loops=1)
Buffers: shared hit=20
-> Index Scan using certnames_transform_certname_key on certnames (cost=0.41..8.43 rows=1 width=85) (actual time=0.025..0.025 rows=1 loops=1)
Index Cond: (certname = 'noway.corp.puppetlabs.net'::text)
Filter: (latest_report_timestamp < '2017-06-01 16:04:13.292-07'::timestamp with time zone)
Buffers: shared hit=4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.