QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Nested Loop (cost=6.67..616.24 rows=1 width=629) (actual time=11870.870..11870.870 rows=0 loops=1) -> Nested Loop (cost=6.67..611.96 rows=1 width=555) (actual time=11870.863..11870.863 rows=0 loops=1) -> Nested Loop (cost=6.67..607.64 rows=1 width=492) (actual time=11870.857..11870.857 rows=0 loops=1) -> Nested Loop (cost=6.67..606.26 rows=1 width=471) (actual time=11870.850..11870.850 rows=0 loops=1) -> Nested Loop (cost=6.67..605.92 rows=1 width=473) (actual time=11870.844..11870.844 rows=0 loops=1) -> Nested Loop (cost=6.67..605.58 rows=1 width=475) (actual time=11870.838..11870.838 rows=0 loops=1) -> Nested Loop (cost=6.67..605.23 rows=1 width=477) (actual time=11870.831..11870.831 rows=0 loops=1) -> Nested Loop (cost=6.67..602.90 rows=3 width=393) (actual time=62.032..10750.797 rows=29905 loops=1) -> Nested Loop (cost=6.67..595.64 rows=21 width=387) (actual time=61.558..6905.828 rows=126625 loops=1) -> Nested Loop (cost=6.67..585.73 rows=21 width=46) (actual time=61.399..1590.547 rows=126625 loops=1) -> Index Scan using sfuser_username on sfuser sfuser2 (cost=0.00..4.27 rows=1 width=45) (actual time=0.122..0.127 rows=1 loops=1) Index Cond: ((username)::text = 'nobody'::text) -> Bitmap Heap Scan on relationship (cost=6.67..577.58 rows=311 width=25) (actual time=61.260..783.652 rows=126625 loops=1) Recheck Cond: ((relationship.origin_id)::text = (sfuser2.id)::text) Filter: ((NOT is_deleted) AND ((relationship_type_name)::text = 'ArtifactAssignment'::text)) -> Bitmap Index Scan on relation_origin (cost=0.00..6.62 rows=311 width=0) (actual time=57.009..57.009 rows=220230 loops=1) Index Cond: ((relationship.origin_id)::text = (sfuser2.id)::text) -> Index Scan using artifact_pk on artifact (cost=0.00..0.46 rows=1 width=341) (actual time=0.025..0.029 rows=1 loops=126625) Index Cond: ((artifact.id)::text = (relationship.target_id)::text) -> Index Scan using field_value_pk on field_value field_value2 (cost=0.00..0.33 rows=1 width=32) (actual time=0.021..0.022 rows=0 loops=126625) Index Cond: ((artifact.status_fv)::text = (field_value2.id)::text) Filter: ((value_class)::text = 'Open'::text) -> Index Scan using item_pk on item (cost=0.00..0.76 rows=1 width=110) (actual time=0.031..0.031 rows=0 loops=29905) Index Cond: ((artifact.id)::text = (item.id)::text) Filter: ((NOT is_deleted) AND ((folder_id)::text = 'tracker11923'::text)) -> Index Scan using field_value_pk on field_value field_value4 (cost=0.00..0.33 rows=1 width=24) (never executed) Index Cond: ((artifact.customer_fv)::text = (field_value4.id)::text) -> Index Scan using field_value_pk on field_value (cost=0.00..0.33 rows=1 width=24) (never executed) Index Cond: ((artifact.group_fv)::text = (field_value.id)::text) -> Index Scan using field_value_pk on field_value field_value3 (cost=0.00..0.33 rows=1 width=24) (never executed) Index Cond: ((artifact.category_fv)::text = (field_value3.id)::text) -> Index Scan using sfuser_pk on sfuser (cost=0.00..1.37 rows=1 width=45) (never executed) Index Cond: ((item.created_by_id)::text = (sfuser.id)::text) -> Index Scan using folder_pk on folder (cost=0.00..4.31 rows=1 width=77) (never executed) Index Cond: ('tracker11923'::text = (id)::text) Filter: ((((path)::text = ANY (('{tracker.cutover_tasks,tracker.peer_review_tracker,tracker.tars_0,tracker.reviews,tracker.defects,tracker.tars,tracker.database_change_requests}'::character varying[])::text[])) OR ((path)::text ~~ 'tracker.cutover_tasks.%'::text) OR ((path)::text ~~ 'tracker.peer_review_tracker.%'::text) OR ((path)::text ~~ 'tracker.tars_0.%'::text) OR ((path)::text ~~ 'tracker.reviews.%'::text) OR ((path)::text ~~ 'tracker.defects.%'::text) OR ((path)::text ~~ 'tracker.tars.%'::text) OR ((path)::text ~~ 'tracker.database_change_requests.%'::text)) AND ((project_id)::text = 'proj1775'::text) AND ((path)::text = 'tracker.defects'::text)) -> Index Scan using project_pk on project (cost=0.00..4.27 rows=1 width=86) (never executed) Index Cond: ('proj1775'::text = (id)::text) Filter: ((path)::text = 'projects.union_gas_gdar_ebt'::text) Total runtime: 11871.582 ms (40 rows)