explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CwUs

Settings
# exclusive inclusive rows x rows loops node
1. 0.036 176.399 ↓ 100.0 100 1

Result (cost=2,134.30..2,308.47 rows=1 width=515) (actual time=35.633..176.399 rows=100 loops=1)

  • One-Time Filter: ((current_setting('nimble.company_id'::text))::bytea = '\x4d670aba143e3287b9d4427a'::bytea)
2. 0.303 176.363 ↓ 100.0 100 1

Nested Loop Left Join (cost=2,134.30..2,308.47 rows=1 width=515) (actual time=35.630..176.363 rows=100 loops=1)

  • Join Filter: (contacts.id = contacts__timestamps.contact_id)
  • Rows Removed by Join Filter: 2,100
3. 0.546 172.460 ↓ 100.0 100 1

Nested Loop Left Join (cost=1,911.21..2,084.52 rows=1 width=374) (actual time=35.149..172.460 rows=100 loops=1)

  • Join Filter: (contacts.id = contacts_values.contact_id)
  • Rows Removed by Join Filter: 4,950
4. 0.514 22.514 ↓ 100.0 100 1

Nested Loop Left Join (cost=242.74..403.28 rows=1 width=233) (actual time=3.539..22.514 rows=100 loops=1)

  • Join Filter: (contacts.id = contacts__addresses.contact_id)
  • Rows Removed by Join Filter: 4,950
5. 1.100 1.100 ↓ 100.0 100 1

Index Scan using contacts_pkey on contacts (cost=0.43..160.28 rows=1 width=92) (actual time=0.062..1.100 rows=100 loops=1)

  • Index Cond: ((company_id = '\x4d670aba143e3287b9d4427a'::bytea) AND (id = ANY ('{""\\x55faf8831d4d27483aa20028"",""\\x564f53a9b2a6bd22cbe5bf55"",""\\x562931d35424db60639f3ade"",""\\x56292ff95424db60639efa03"",""\\x55fafa561d4d27483aa2ae4e"",""\\x56292bba5424db60639e939a"",""\\x56292e575424db60639ec712"",""\\x55fafa481d4d27483aa2a9ed"",""\\x55faf86b1d4d27483aa1f37b"",""\\x56292b475424db60639e88e6"",""\\x55faf82f1d4d27483aa1d622"",""\\x56292bb15424db60639e92e8"",""\\x56292cb55424db60639ea481"",""\\x55faf7ef1d4d27483aa1bd12"",""\\x55fafa6c1d4d27483aa2b503"",""\\x55faf82f1d4d27483aa1d60d"",""\\x562931235424db60639f244f"",""\\x5e16113d01925b0e08feab40"",""\\x55faf83d1d4d27483aa1dbc7"",""\\x55faf7d41d4d27483aa1b12c"",""\\x55faf9461d4d27483aa252d1"",""\\x55fafa061d4d27483aa294d0"",""\\x56292b9b5424db60639e90cf"",""\\x56292f8d5424db60639ee9c8"",""\\x5d1f88f67c8946fce6ec7791"",""\\x56292dd05424db60639eb8f3"",""\\x56292b985424db60639e9083"",""\\x562930af5424db60639f1659"",""\\x5629328f5424db60639f4fa0"",""\\x55faf94c1d4d27483aa254f3"",""\\x5638ee452007d01e995349fc"",""\\x562930485424db60639f083c"",""\\x55fafb041d4d27483aa2ebb9"",""\\x55faf88b1d4d27483aa204f4"",""\\x566ef9c31cf9573e77f10870"",""\\x562a6badb2a6bd13d0e76a85"",""\\x55fafa3a1d4d27483aa2a5cc"",""\\x55faf8591d4d27483aa1ea61"",""\\x56292b8b5424db60639e8f5a"",""\\x55fafa7d1d4d27483aa2baf6"",""\\x55faf93f1d4d27483aa24ff4"",""\\x5629315c5424db60639f2c55"",""\\x55fafabc1d4d27483aa2d221"",""\\x55faf8ed1d4d27483aa23177"",""\\x56292e975424db60639ecdd9"",""\\x55fafaac1d4d27483aa2cc72"",""\\x564f53a3b2a6bd22cbe5be3b"",""\\x55faf8171d4d27483aa1cd01"",""\\x562930875424db60639f1285"",""\\x55fafa0c1d4d27483aa2971c"",""\\x55faf7961d4d27483aa190e7"",""\\x56292c525424db60639e9e0d"",""\\x562fa460000efa22c561081e"",""\\x566ef9ce1cf9573e77f10b99"",""\\x560c185d1cf95777bd3eeb35"",""\\x55faf92b1d4d27483aa24764"",""\\x56b1320eb2a6bd4972573024"",""\\x56b1318eb2a6bd4972571f40"",""\\x56b13062b2a6bd497256fb19"",""\\x56b13034b2a6bd497256f6f1"",""\\x566b03775d47ea43b5fd1e60"",""\\x56b130d4b2a6bd497257091d"",""\\x55faf87c1d4d27483aa1fc71"",""\\x56b13160b2a6bd497257193d"",""\\x56994b82ecb5e70d9b53e260"",""\\x56b1317bb2a6bd4972571c99"",""\\x55faf9d61d4d27483aa2835d"",""\\x5665d1895d47ea5548aae504"",""\\x56994b7aecb5e70d9b53e099"",""\\x56994b74ecb5e70d9b53df83"",""\\x55faf97b1d4d27483aa26348"",""\\x56b13019b2a6bd497256f49e"",""\\x56b130b8b2a6bd4972570568"",""\\x56b13200b2a6bd4972572de4"",""\\x56b131f9b2a6bd4972572cee"",""\\x56994b86ecb5e70d9b53e337"",""\\x56b13479b2a6bd4972576476"",""\\x56b13562b2a6bd4972577815"",""\\x56b136e4b2a6bd4972579cd9"",""\\x56b1351db2a6bd4972577107"",""\\x55faf8031d4d27483aa1c434"",""\\x56b13390b2a6bd4972575394"",""\\x56b1364cb2a6bd4972578d16"",""\\x56b13442b2a6bd497257609d"",""\\x56b13418b2a6bd4972575d30"",""\\x56b133beb2a6bd4972575761"",""\\x56b13213b2a6bd497257311b"",""\\x56b13235b2a6bd4972573677"",""\\x56b13383b2a6bd49725752a1"",""\\x56b1310ab2a6bd4972570ea0"",""\\x56b1318bb2a6bd4972571e9d"",""\\x56b131c3b2a6bd497257253b"",""\\x56b134b6b2a6bd4972576919"",""\\x56b132afb2a6bd497257439a"",""\\x56b1335fb2a6bd4972574fd0"",""\\x56b1322fb2a6bd497257359c"",""\\x56b136a3b2a6bd49725796a1"",""\\x56b13379b2a6bd49725751bb"",""\\x56b134f7b2a6bd4972576e1f"",""\\x56b13254b2a6bd4972573b87""}'::bytea[])))
  • Filter: ((owner_id = (current_setting('nimble.user_id'::text))::bytea) OR (read_for_users && '{""\\x00""}'::bytea[]) OR (read_for_users && ARRAY[(current_setting('nimble.user_id'::text))::bytea]) OR (read_for_groups && (string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[]) OR (edit_for_users && ARRAY[(current_setting('nimble.user_id'::text))::bytea]) OR (edit_for_groups && (string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[]))
6. 16.600 20.900 ↓ 4.2 50 100

GroupAggregate (cost=242.31..242.73 rows=12 width=141) (actual time=0.039..0.209 rows=50 loops=100)

  • Group Key: contacts__addresses.contact_id
7. 1.074 4.300 ↓ 17.7 212 100

Sort (cost=242.31..242.34 rows=12 width=90) (actual time=0.035..0.043 rows=212 loops=100)

  • Sort Key: contacts__addresses.contact_id
  • Sort Method: quicksort Memory: 83kB
8. 1.006 3.226 ↓ 30.8 370 1

Index Scan using contacts__addresses_pkey on contacts__addresses (cost=0.55..242.10 rows=12 width=90) (actual time=0.087..3.226 rows=370 loops=1)

  • Index Cond: ((company_id = '\x4d670aba143e3287b9d4427a'::bytea) AND (contact_id = ANY ('{""\\x55faf8831d4d27483aa20028"",""\\x564f53a9b2a6bd22cbe5bf55"",""\\x562931d35424db60639f3ade"",""\\x56292ff95424db60639efa03"",""\\x55fafa561d4d27483aa2ae4e"",""\\x56292bba5424db60639e939a"",""\\x56292e575424db60639ec712"",""\\x55fafa481d4d27483aa2a9ed"",""\\x55faf86b1d4d27483aa1f37b"",""\\x56292b475424db60639e88e6"",""\\x55faf82f1d4d27483aa1d622"",""\\x56292bb15424db60639e92e8"",""\\x56292cb55424db60639ea481"",""\\x55faf7ef1d4d27483aa1bd12"",""\\x55fafa6c1d4d27483aa2b503"",""\\x55faf82f1d4d27483aa1d60d"",""\\x562931235424db60639f244f"",""\\x5e16113d01925b0e08feab40"",""\\x55faf83d1d4d27483aa1dbc7"",""\\x55faf7d41d4d27483aa1b12c"",""\\x55faf9461d4d27483aa252d1"",""\\x55fafa061d4d27483aa294d0"",""\\x56292b9b5424db60639e90cf"",""\\x56292f8d5424db60639ee9c8"",""\\x5d1f88f67c8946fce6ec7791"",""\\x56292dd05424db60639eb8f3"",""\\x56292b985424db60639e9083"",""\\x562930af5424db60639f1659"",""\\x5629328f5424db60639f4fa0"",""\\x55faf94c1d4d27483aa254f3"",""\\x5638ee452007d01e995349fc"",""\\x562930485424db60639f083c"",""\\x55fafb041d4d27483aa2ebb9"",""\\x55faf88b1d4d27483aa204f4"",""\\x566ef9c31cf9573e77f10870"",""\\x562a6badb2a6bd13d0e76a85"",""\\x55fafa3a1d4d27483aa2a5cc"",""\\x55faf8591d4d27483aa1ea61"",""\\x56292b8b5424db60639e8f5a"",""\\x55fafa7d1d4d27483aa2baf6"",""\\x55faf93f1d4d27483aa24ff4"",""\\x5629315c5424db60639f2c55"",""\\x55fafabc1d4d27483aa2d221"",""\\x55faf8ed1d4d27483aa23177"",""\\x56292e975424db60639ecdd9"",""\\x55fafaac1d4d27483aa2cc72"",""\\x564f53a3b2a6bd22cbe5be3b"",""\\x55faf8171d4d27483aa1cd01"",""\\x562930875424db60639f1285"",""\\x55fafa0c1d4d27483aa2971c"",""\\x55faf7961d4d27483aa190e7"",""\\x56292c525424db60639e9e0d"",""\\x562fa460000efa22c561081e"",""\\x566ef9ce1cf9573e77f10b99"",""\\x560c185d1cf95777bd3eeb35"",""\\x55faf92b1d4d27483aa24764"",""\\x56b1320eb2a6bd4972573024"",""\\x56b1318eb2a6bd4972571f40"",""\\x56b13062b2a6bd497256fb19"",""\\x56b13034b2a6bd497256f6f1"",""\\x566b03775d47ea43b5fd1e60"",""\\x56b130d4b2a6bd497257091d"",""\\x55faf87c1d4d27483aa1fc71"",""\\x56b13160b2a6bd497257193d"",""\\x56994b82ecb5e70d9b53e260"",""\\x56b1317bb2a6bd4972571c99"",""\\x55faf9d61d4d27483aa2835d"",""\\x5665d1895d47ea5548aae504"",""\\x56994b7aecb5e70d9b53e099"",""\\x56994b74ecb5e70d9b53df83"",""\\x55faf97b1d4d27483aa26348"",""\\x56b13019b2a6bd497256f49e"",""\\x56b130b8b2a6bd4972570568"",""\\x56b13200b2a6bd4972572de4"",""\\x56b131f9b2a6bd4972572cee"",""\\x56994b86ecb5e70d9b53e337"",""\\x56b13479b2a6bd4972576476"",""\\x56b13562b2a6bd4972577815"",""\\x56b136e4b2a6bd4972579cd9"",""\\x56b1351db2a6bd4972577107"",""\\x55faf8031d4d27483aa1c434"",""\\x56b13390b2a6bd4972575394"",""\\x56b1364cb2a6bd4972578d16"",""\\x56b13442b2a6bd497257609d"",""\\x56b13418b2a6bd4972575d30"",""\\x56b133beb2a6bd4972575761"",""\\x56b13213b2a6bd497257311b"",""\\x56b13235b2a6bd4972573677"",""\\x56b13383b2a6bd49725752a1"",""\\x56b1310ab2a6bd4972570ea0"",""\\x56b1318bb2a6bd4972571e9d"",""\\x56b131c3b2a6bd497257253b"",""\\x56b134b6b2a6bd4972576919"",""\\x56b132afb2a6bd497257439a"",""\\x56b1335fb2a6bd4972574fd0"",""\\x56b1322fb2a6bd497257359c"",""\\x56b136a3b2a6bd49725796a1"",""\\x56b13379b2a6bd49725751bb"",""\\x56b134f7b2a6bd4972576e1f"",""\\x56b13254b2a6bd4972573b87""}'::bytea[])))
  • Filter: ((SubPlan 1) IS TRUE)
9.          

SubPlan (for Index Scan)

10. 2.220 2.220 ↑ 1.0 1 370

Index Scan using contacts_pkey on contacts contacts_1 (cost=0.44..2.79 rows=1 width=1) (actual time=0.006..0.006 rows=1 loops=370)

  • Index Cond: ((company_id = (current_setting('nimble.company_id'::text))::bytea) AND (id = contacts__addresses.contact_id))
  • Filter: ((company_id = company_id) AND ((owner_id = (current_setting('nimble.user_id'::text))::bytea) OR (read_for_users && '{""\\x00""}'::bytea[]) OR (read_for_users && ARRAY[(current_setting('nimble.user_id'::text))::bytea]) OR (read_for_groups && (string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[]) OR (edit_for_users && ARRAY[(current_setting('nimble.user_id'::text))::bytea]) OR (edit_for_groups && (string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[])))
11. 109.600 149.400 ↑ 4.4 51 100

GroupAggregate (cost=1,668.47..1,676.24 rows=222 width=141) (actual time=0.338..1.494 rows=51 loops=100)

  • Group Key: contacts_values.contact_id
12. 10.468 39.800 ↓ 9.7 2,160 100

Sort (cost=1,668.47..1,669.03 rows=222 width=60) (actual time=0.316..0.398 rows=2,160 loops=100)

  • Sort Key: contacts_values.contact_id
  • Sort Method: quicksort Memory: 597kB
13. 5.578 29.332 ↓ 17.8 3,959 1

Index Scan using contacts_values_pkey on contacts_values (cost=0.56..1,659.82 rows=222 width=60) (actual time=0.050..29.332 rows=3,959 loops=1)

  • Index Cond: ((company_id = '\x4d670aba143e3287b9d4427a'::bytea) AND (contact_id = ANY ('{""\\x55faf8831d4d27483aa20028"",""\\x564f53a9b2a6bd22cbe5bf55"",""\\x562931d35424db60639f3ade"",""\\x56292ff95424db60639efa03"",""\\x55fafa561d4d27483aa2ae4e"",""\\x56292bba5424db60639e939a"",""\\x56292e575424db60639ec712"",""\\x55fafa481d4d27483aa2a9ed"",""\\x55faf86b1d4d27483aa1f37b"",""\\x56292b475424db60639e88e6"",""\\x55faf82f1d4d27483aa1d622"",""\\x56292bb15424db60639e92e8"",""\\x56292cb55424db60639ea481"",""\\x55faf7ef1d4d27483aa1bd12"",""\\x55fafa6c1d4d27483aa2b503"",""\\x55faf82f1d4d27483aa1d60d"",""\\x562931235424db60639f244f"",""\\x5e16113d01925b0e08feab40"",""\\x55faf83d1d4d27483aa1dbc7"",""\\x55faf7d41d4d27483aa1b12c"",""\\x55faf9461d4d27483aa252d1"",""\\x55fafa061d4d27483aa294d0"",""\\x56292b9b5424db60639e90cf"",""\\x56292f8d5424db60639ee9c8"",""\\x5d1f88f67c8946fce6ec7791"",""\\x56292dd05424db60639eb8f3"",""\\x56292b985424db60639e9083"",""\\x562930af5424db60639f1659"",""\\x5629328f5424db60639f4fa0"",""\\x55faf94c1d4d27483aa254f3"",""\\x5638ee452007d01e995349fc"",""\\x562930485424db60639f083c"",""\\x55fafb041d4d27483aa2ebb9"",""\\x55faf88b1d4d27483aa204f4"",""\\x566ef9c31cf9573e77f10870"",""\\x562a6badb2a6bd13d0e76a85"",""\\x55fafa3a1d4d27483aa2a5cc"",""\\x55faf8591d4d27483aa1ea61"",""\\x56292b8b5424db60639e8f5a"",""\\x55fafa7d1d4d27483aa2baf6"",""\\x55faf93f1d4d27483aa24ff4"",""\\x5629315c5424db60639f2c55"",""\\x55fafabc1d4d27483aa2d221"",""\\x55faf8ed1d4d27483aa23177"",""\\x56292e975424db60639ecdd9"",""\\x55fafaac1d4d27483aa2cc72"",""\\x564f53a3b2a6bd22cbe5be3b"",""\\x55faf8171d4d27483aa1cd01"",""\\x562930875424db60639f1285"",""\\x55fafa0c1d4d27483aa2971c"",""\\x55faf7961d4d27483aa190e7"",""\\x56292c525424db60639e9e0d"",""\\x562fa460000efa22c561081e"",""\\x566ef9ce1cf9573e77f10b99"",""\\x560c185d1cf95777bd3eeb35"",""\\x55faf92b1d4d27483aa24764"",""\\x56b1320eb2a6bd4972573024"",""\\x56b1318eb2a6bd4972571f40"",""\\x56b13062b2a6bd497256fb19"",""\\x56b13034b2a6bd497256f6f1"",""\\x566b03775d47ea43b5fd1e60"",""\\x56b130d4b2a6bd497257091d"",""\\x55faf87c1d4d27483aa1fc71"",""\\x56b13160b2a6bd497257193d"",""\\x56994b82ecb5e70d9b53e260"",""\\x56b1317bb2a6bd4972571c99"",""\\x55faf9d61d4d27483aa2835d"",""\\x5665d1895d47ea5548aae504"",""\\x56994b7aecb5e70d9b53e099"",""\\x56994b74ecb5e70d9b53df83"",""\\x55faf97b1d4d27483aa26348"",""\\x56b13019b2a6bd497256f49e"",""\\x56b130b8b2a6bd4972570568"",""\\x56b13200b2a6bd4972572de4"",""\\x56b131f9b2a6bd4972572cee"",""\\x56994b86ecb5e70d9b53e337"",""\\x56b13479b2a6bd4972576476"",""\\x56b13562b2a6bd4972577815"",""\\x56b136e4b2a6bd4972579cd9"",""\\x56b1351db2a6bd4972577107"",""\\x55faf8031d4d27483aa1c434"",""\\x56b13390b2a6bd4972575394"",""\\x56b1364cb2a6bd4972578d16"",""\\x56b13442b2a6bd497257609d"",""\\x56b13418b2a6bd4972575d30"",""\\x56b133beb2a6bd4972575761"",""\\x56b13213b2a6bd497257311b"",""\\x56b13235b2a6bd4972573677"",""\\x56b13383b2a6bd49725752a1"",""\\x56b1310ab2a6bd4972570ea0"",""\\x56b1318bb2a6bd4972571e9d"",""\\x56b131c3b2a6bd497257253b"",""\\x56b134b6b2a6bd4972576919"",""\\x56b132afb2a6bd497257439a"",""\\x56b1335fb2a6bd4972574fd0"",""\\x56b1322fb2a6bd497257359c"",""\\x56b136a3b2a6bd49725796a1"",""\\x56b13379b2a6bd49725751bb"",""\\x56b134f7b2a6bd4972576e1f"",""\\x56b13254b2a6bd4972573b87""}'::bytea[])))
  • Filter: ((SubPlan 2) IS TRUE)
14.          

SubPlan (for Index Scan)

15. 23.754 23.754 ↑ 1.0 1 3,959

Index Scan using contacts_pkey on contacts contacts_2 (cost=0.44..2.79 rows=1 width=1) (actual time=0.005..0.006 rows=1 loops=3,959)

  • Index Cond: ((company_id = (current_setting('nimble.company_id'::text))::bytea) AND (id = contacts_values.contact_id))
  • Filter: ((company_id = company_id) AND ((owner_id = (current_setting('nimble.user_id'::text))::bytea) OR (read_for_users && '{""\\x00""}'::bytea[]) OR (read_for_users && ARRAY[(current_setting('nimble.user_id'::text))::bytea]) OR (read_for_groups && (string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[]) OR (edit_for_users && ARRAY[(current_setting('nimble.user_id'::text))::bytea]) OR (edit_for_groups && (string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[])))
16. 3.100 3.600 ↓ 1.4 21 100

GroupAggregate (cost=223.08..223.60 rows=15 width=141) (actual time=0.007..0.036 rows=21 loops=100)

  • Group Key: contacts__timestamps.contact_id
17. 0.077 0.500 ↓ 1.4 21 100

Sort (cost=223.08..223.12 rows=15 width=45) (actual time=0.004..0.005 rows=21 loops=100)

  • Sort Key: contacts__timestamps.contact_id
  • Sort Method: quicksort Memory: 27kB
18. 0.279 0.423 ↓ 1.6 24 1

Index Scan using contacts__timestamps_pkey on contacts__timestamps (cost=0.41..222.79 rows=15 width=45) (actual time=0.064..0.423 rows=24 loops=1)

  • Index Cond: ((company_id = '\x4d670aba143e3287b9d4427a'::bytea) AND (contact_id = ANY ('{""\\x55faf8831d4d27483aa20028"",""\\x564f53a9b2a6bd22cbe5bf55"",""\\x562931d35424db60639f3ade"",""\\x56292ff95424db60639efa03"",""\\x55fafa561d4d27483aa2ae4e"",""\\x56292bba5424db60639e939a"",""\\x56292e575424db60639ec712"",""\\x55fafa481d4d27483aa2a9ed"",""\\x55faf86b1d4d27483aa1f37b"",""\\x56292b475424db60639e88e6"",""\\x55faf82f1d4d27483aa1d622"",""\\x56292bb15424db60639e92e8"",""\\x56292cb55424db60639ea481"",""\\x55faf7ef1d4d27483aa1bd12"",""\\x55fafa6c1d4d27483aa2b503"",""\\x55faf82f1d4d27483aa1d60d"",""\\x562931235424db60639f244f"",""\\x5e16113d01925b0e08feab40"",""\\x55faf83d1d4d27483aa1dbc7"",""\\x55faf7d41d4d27483aa1b12c"",""\\x55faf9461d4d27483aa252d1"",""\\x55fafa061d4d27483aa294d0"",""\\x56292b9b5424db60639e90cf"",""\\x56292f8d5424db60639ee9c8"",""\\x5d1f88f67c8946fce6ec7791"",""\\x56292dd05424db60639eb8f3"",""\\x56292b985424db60639e9083"",""\\x562930af5424db60639f1659"",""\\x5629328f5424db60639f4fa0"",""\\x55faf94c1d4d27483aa254f3"",""\\x5638ee452007d01e995349fc"",""\\x562930485424db60639f083c"",""\\x55fafb041d4d27483aa2ebb9"",""\\x55faf88b1d4d27483aa204f4"",""\\x566ef9c31cf9573e77f10870"",""\\x562a6badb2a6bd13d0e76a85"",""\\x55fafa3a1d4d27483aa2a5cc"",""\\x55faf8591d4d27483aa1ea61"",""\\x56292b8b5424db60639e8f5a"",""\\x55fafa7d1d4d27483aa2baf6"",""\\x55faf93f1d4d27483aa24ff4"",""\\x5629315c5424db60639f2c55"",""\\x55fafabc1d4d27483aa2d221"",""\\x55faf8ed1d4d27483aa23177"",""\\x56292e975424db60639ecdd9"",""\\x55fafaac1d4d27483aa2cc72"",""\\x564f53a3b2a6bd22cbe5be3b"",""\\x55faf8171d4d27483aa1cd01"",""\\x562930875424db60639f1285"",""\\x55fafa0c1d4d27483aa2971c"",""\\x55faf7961d4d27483aa190e7"",""\\x56292c525424db60639e9e0d"",""\\x562fa460000efa22c561081e"",""\\x566ef9ce1cf9573e77f10b99"",""\\x560c185d1cf95777bd3eeb35"",""\\x55faf92b1d4d27483aa24764"",""\\x56b1320eb2a6bd4972573024"",""\\x56b1318eb2a6bd4972571f40"",""\\x56b13062b2a6bd497256fb19"",""\\x56b13034b2a6bd497256f6f1"",""\\x566b03775d47ea43b5fd1e60"",""\\x56b130d4b2a6bd497257091d"",""\\x55faf87c1d4d27483aa1fc71"",""\\x56b13160b2a6bd497257193d"",""\\x56994b82ecb5e70d9b53e260"",""\\x56b1317bb2a6bd4972571c99"",""\\x55faf9d61d4d27483aa2835d"",""\\x5665d1895d47ea5548aae504"",""\\x56994b7aecb5e70d9b53e099"",""\\x56994b74ecb5e70d9b53df83"",""\\x55faf97b1d4d27483aa26348"",""\\x56b13019b2a6bd497256f49e"",""\\x56b130b8b2a6bd4972570568"",""\\x56b13200b2a6bd4972572de4"",""\\x56b131f9b2a6bd4972572cee"",""\\x56994b86ecb5e70d9b53e337"",""\\x56b13479b2a6bd4972576476"",""\\x56b13562b2a6bd4972577815"",""\\x56b136e4b2a6bd4972579cd9"",""\\x56b1351db2a6bd4972577107"",""\\x55faf8031d4d27483aa1c434"",""\\x56b13390b2a6bd4972575394"",""\\x56b1364cb2a6bd4972578d16"",""\\x56b13442b2a6bd497257609d"",""\\x56b13418b2a6bd4972575d30"",""\\x56b133beb2a6bd4972575761"",""\\x56b13213b2a6bd497257311b"",""\\x56b13235b2a6bd4972573677"",""\\x56b13383b2a6bd49725752a1"",""\\x56b1310ab2a6bd4972570ea0"",""\\x56b1318bb2a6bd4972571e9d"",""\\x56b131c3b2a6bd497257253b"",""\\x56b134b6b2a6bd4972576919"",""\\x56b132afb2a6bd497257439a"",""\\x56b1335fb2a6bd4972574fd0"",""\\x56b1322fb2a6bd497257359c"",""\\x56b136a3b2a6bd49725796a1"",""\\x56b13379b2a6bd49725751bb"",""\\x56b134f7b2a6bd4972576e1f"",""\\x56b13254b2a6bd4972573b87""}'::bytea[])))
  • Filter: ((SubPlan 3) IS TRUE)
19.          

SubPlan (for Index Scan)

20. 0.144 0.144 ↑ 1.0 1 24

Index Scan using contacts_pkey on contacts contacts_3 (cost=0.44..2.79 rows=1 width=1) (actual time=0.006..0.006 rows=1 loops=24)

  • Index Cond: ((company_id = (current_setting('nimble.company_id'::text))::bytea) AND (id = contacts__timestamps.contact_id))
  • Filter: ((company_id = company_id) AND ((owner_id = (current_setting('nimble.user_id'::text))::bytea) OR (read_for_users && '{""\\x00""}'::bytea[]) OR (read_for_users && ARRAY[(current_setting('nimble.user_id'::text))::bytea]) OR (read_for_groups && (string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[]) OR (edit_for_users && ARRAY[(current_setting('nimble.user_id'::text))::bytea]) OR (edit_for_groups && (string_to_array(current_setting('nimble.group_ids'::text), ','::text))::bytea[])))
Planning time : 4.130 ms
Execution time : 177.214 ms