| GroupAggregate (cost=24.33..24.35 rows=1 width=48) |
| Group Key: dg.id |
| -> Sort (cost=24.33..24.34 rows=1 width=286) |
| Sort Key: dg.id |
| -> Nested Loop (cost=0.29..24.32 rows=1 width=286) |
| -> Nested Loop Left Join (cost=0.00..16.00 rows=1 width=290) |
| Join Filter: (d.document_type_id = dg.id) |
| -> Seq Scan on tbl_documents d (cost=0.00..14.75 rows=1 width=16) |
| Filter: ((document_type_id IS NULL) AND (document_type_id = '-1'::integer) AND (department_id = 1)) |
| -> Seq Scan on tbl_document_types dg (cost=0.00..1.24 rows=1 width=278) |
| Filter: (id = '-1'::integer) |
| -> Index Scan using tbl_term_taxonomy_relationships_object_id_term_id_idx on tbl_term_taxonomy_relationships dt (cost=0.29..8.31 rows=1 width=4) |
| Index Cond: ((object_id = d.id) AND (term_id = 7)) |
| Filter: (taxonomy_id = 116) |