"QUERY PLAN" "Limit (cost=1.55..68057.21 rows=2 width=184)" " -> Append (cost=1.55..68057.21 rows=2 width=184)" " -> Nested Loop Left Join (cost=1.55..17.64 rows=1 width=161)" " Filter: ((c.destfileid IS NULL) OR (conversiondestfile.id IS NOT NULL))" " -> Nested Loop (cost=0.98..13.09 rows=1 width=161)" " -> Limit (cost=0.70..4.76 rows=1 width=2926)" " -> Index Scan using mdl_file_con_ix on mdl_files (cost=0.70..10312.51 rows=2536 width=2926)" " Index Cond: ((contenthash)::text = '94f195cd0f77ecd6fb16004dcac7afd4f7a26d6b'::text)" " -> Index Scan using mdl_fileconv_sou_ix on mdl_file_conversion c (cost=0.29..8.31 rows=1 width=161)" " Index Cond: (sourcefileid = mdl_files.id)" " Filter: ((targetformat)::text = 'pdf'::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)"