"QUERY PLAN" "Limit (cost=10203.70..78999.68 rows=2 width=184)" " -> Append (cost=10203.70..78999.68 rows=2 width=184)" " -> Nested Loop Left Join (cost=10203.70..10960.10 rows=1 width=161)" " Filter: ((c.destfileid IS NULL) OR (conversiondestfile.id IS NOT NULL))" " -> Hash Join (cost=10203.13..10955.55 rows=1 width=161)" " Hash Cond: (c.sourcefileid = conversionsourcefile.id)" " -> Seq Scan on mdl_file_conversion c (cost=0.00..699.76 rows=20061 width=161)" " Filter: ((targetformat)::text = 'pdf'::text)" " -> Hash (cost=10171.43..10171.43 rows=2536 width=8)" " -> Bitmap Heap Scan on mdl_files conversionsourcefile (cost=148.35..10171.43 rows=2536 width=8)" " Recheck Cond: ((contenthash)::text = '94f195cd0f77ecd6fb16004dcac7afd4f7a26d6b'::text)" " -> Bitmap Index Scan on mdl_file_con_ix (cost=0.00..147.72 rows=2536 width=0)" " Index Cond: ((contenthash)::text = '94f195cd0f77ecd6fb16004dcac7afd4f7a26d6b'::text)" " -> Index Only Scan using mdl_file_id_pk on mdl_files conversiondestfile (cost=0.57..4.54 rows=1 width=8)" " Index Cond: (id = c.destfileid)" " -> Subquery Scan on ""*SELECT* 2"" (cost=1.68..68039.55 rows=1 width=184)" " -> Nested Loop Left Join (cost=1.68..68039.53 rows=1 width=168)" " Filter: (orphanedconversion.id IS NULL)" " -> Nested Loop (cost=1.27..68031.80 rows=1 width=16)" " Join Filter: ((orphanedsourcefile.contenthash)::text = (orphaneddestfile.filename)::text)" " -> Index Scan using mdl_file_id_pk on mdl_files orphanedsourcefile (cost=0.57..8.59 rows=1 width=49)" " Index Cond: (id = 356994111)" " -> Index Scan using mdl_file_comfilconite_ix on mdl_files orphaneddestfile (cost=0.70..68021.45 rows=141 width=22)" " Index Cond: (((component)::text = 'core'::text) AND ((filearea)::text = 'documentconversion'::text))" " Filter: ((filepath)::text = '/pdf/'::text)" " -> Index Scan using mdl_fileconv_des_ix on mdl_file_conversion orphanedconversion (cost=0.41..7.72 rows=1 width=16)" " Index Cond: (destfileid = orphaneddestfile.id)"