| GroupAggregate (cost=31.62..31.64 rows=1 width=48) |
| Group Key: tt.id |
| -> Sort (cost=31.62..31.63 rows=1 width=24) |
| Sort Key: tt.id |
| -> Nested Loop Left Join (cost=0.73..31.61 rows=1 width=24) |
| -> Nested Loop Left Join (cost=0.58..31.39 rows=1 width=12) |
| -> Nested Loop (cost=0.29..23.07 rows=1 width=12) |
| -> 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)) |
| -> 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) |
| -> Index Scan using tbl_term_taxonomy_relationships_object_id_term_id_idx on tbl_term_taxonomy_relationships ttr (cost=0.29..8.31 rows=1 width=8) |
| Index Cond: ((object_id = d.id) AND (term_id = 7)) |
| -> Index Scan using tbl_term_taxonomies_pkey on tbl_term_taxonomies tt (cost=0.15..0.22 rows=1 width=16) |
| Index Cond: (ttr.taxonomy_id = id) |