Execution time: 513ms
Planning time: 0.473ms
Triggers: N/A
#1 Limit
#2 â”” Result
#3  ├ Sort
#4  │└ Group
#5  │ └ Gather Merge
#6  │  └ Group
#7  │   └ Sort
#8  │    └ Parallel Bitmap Heap Scan
#9  │     └ Bitmap Index Scan
 └ SubPlan 1
#10  └ Simple Aggregate
#11   └ Bitmap Heap Scan
#12    └ Bitmap Index Scan

Limit

Result

Sort

by contacts.last_activity_at DESC NULLS LAST
SubPlan 1

Simple Aggregate

Group

by contacts.id

Bitmap Heap Scan

on public.conversations as conversations
0

Gather Merge

Bitmap Index Scan

using index_conversations_on_contact_id
1
0

Group

by contacts.id
1
0

Sort

by contacts.id
1
0

Parallel Bitmap Heap Scan

on public.contacts as contacts
1
0

Bitmap Index Scan

using index_contacts_on_account_id
[
  {
    "Plan": {
      "Node Type": "Limit",
      "Parallel Aware": false,
      "Async Capable": false,
      "Startup Cost": 613716.27,
      "Total Cost": 1240424.95,
      "Plan Rows": 20,
      "Plan Width": 232,
      "Actual Startup Time": 510.000,
      "Actual Total Time": 513.074,
      "Actual Rows": 20,
      "Actual Loops": 1,
      "Output": ["contacts.id", "contacts.name", "contacts.email", "contacts.phone_number", "contacts.account_id", "contacts.created_at", "contacts.updated_at", "contacts.additional_attributes", "contacts.identifier", "contacts.custom_attributes", "contacts.last_activity_at", "((SubPlan 1))"],
      "Shared Hit Blocks": 28585,
      "Shared Read Blocks": 41615,
      "Shared Dirtied Blocks": 0,
      "Shared Written Blocks": 0,
      "Local Hit Blocks": 0,
      "Local Read Blocks": 0,
      "Local Dirtied Blocks": 0,
      "Local Written Blocks": 0,
      "Temp Read Blocks": 0,
      "Temp Written Blocks": 0,
      "I/O Read Time": 161.862,
      "I/O Write Time": 0.000,
      "Temp I/O Read Time": 0.000,
      "Temp I/O Write Time": 0.000,
      "Plans": [
        {
          "Node Type": "Result",
          "Parent Relationship": "Outer",
          "Parallel Aware": false,
          "Async Capable": false,
          "Startup Cost": 613716.27,
          "Total Cost": 5258950201.58,
          "Plan Rows": 167808,
          "Plan Width": 232,
          "Actual Startup Time": 509.998,
          "Actual Total Time": 513.069,
          "Actual Rows": 20,
          "Actual Loops": 1,
          "Output": ["contacts.id", "contacts.name", "contacts.email", "contacts.phone_number", "contacts.account_id", "contacts.created_at", "contacts.updated_at", "contacts.additional_attributes", "contacts.identifier", "contacts.custom_attributes", "contacts.last_activity_at", "(SubPlan 1)"],
          "Shared Hit Blocks": 28585,
          "Shared Read Blocks": 41615,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0,
          "I/O Read Time": 161.862,
          "I/O Write Time": 0.000,
          "Temp I/O Read Time": 0.000,
          "Temp I/O Write Time": 0.000,
          "Plans": [
            {
              "Node Type": "Sort",
              "Parent Relationship": "Outer",
              "Parallel Aware": false,
              "Async Capable": false,
              "Startup Cost": 613716.27,
              "Total Cost": 614135.79,
              "Plan Rows": 167808,
              "Plan Width": 224,
              "Actual Startup Time": 509.933,
              "Actual Total Time": 512.778,
              "Actual Rows": 20,
              "Actual Loops": 1,
              "Output": ["contacts.id", "contacts.name", "contacts.email", "contacts.phone_number", "contacts.account_id", "contacts.created_at", "contacts.updated_at", "contacts.additional_attributes", "contacts.identifier", "contacts.custom_attributes", "contacts.last_activity_at"],
              "Sort Key": ["contacts.last_activity_at DESC NULLS LAST"],
              "Sort Method": "quicksort",
              "Sort Space Used": 28,
              "Sort Space Type": "Memory",
              "Shared Hit Blocks": 28523,
              "Shared Read Blocks": 41581,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0,
              "I/O Read Time": 161.765,
              "I/O Write Time": 0.000,
              "Temp I/O Read Time": 0.000,
              "Temp I/O Write Time": 0.000,
              "Plans": [
                {
                  "Node Type": "Group",
                  "Parent Relationship": "Outer",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Startup Cost": 592410.75,
                  "Total Cost": 609250.96,
                  "Plan Rows": 167808,
                  "Plan Width": 224,
                  "Actual Startup Time": 509.889,
                  "Actual Total Time": 512.753,
                  "Actual Rows": 27,
                  "Actual Loops": 1,
                  "Output": ["contacts.id", "contacts.name", "contacts.email", "contacts.phone_number", "contacts.account_id", "contacts.created_at", "contacts.updated_at", "contacts.additional_attributes", "contacts.identifier", "contacts.custom_attributes", "contacts.last_activity_at"],
                  "Group Key": ["contacts.id"],
                  "Shared Hit Blocks": 28523,
                  "Shared Read Blocks": 41581,
                  "Shared Dirtied Blocks": 0,
                  "Shared Written Blocks": 0,
                  "Local Hit Blocks": 0,
                  "Local Read Blocks": 0,
                  "Local Dirtied Blocks": 0,
                  "Local Written Blocks": 0,
                  "Temp Read Blocks": 0,
                  "Temp Written Blocks": 0,
                  "I/O Read Time": 161.765,
                  "I/O Write Time": 0.000,
                  "Temp I/O Read Time": 0.000,
                  "Temp I/O Write Time": 0.000,
                  "Plans": [
                    {
                      "Node Type": "Gather Merge",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Startup Cost": 592410.75,
                      "Total Cost": 608901.36,
                      "Plan Rows": 139840,
                      "Plan Width": 224,
                      "Actual Startup Time": 509.885,
                      "Actual Total Time": 512.738,
                      "Actual Rows": 27,
                      "Actual Loops": 1,
                      "Output": ["contacts.id", "contacts.name", "contacts.email", "contacts.phone_number", "contacts.account_id", "contacts.created_at", "contacts.updated_at", "contacts.additional_attributes", "contacts.identifier", "contacts.custom_attributes", "contacts.last_activity_at"],
                      "Workers Planned": 2,
                      "Workers Launched": 2,
                      "Shared Hit Blocks": 28523,
                      "Shared Read Blocks": 41581,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "I/O Read Time": 161.765,
                      "I/O Write Time": 0.000,
                      "Temp I/O Read Time": 0.000,
                      "Temp I/O Write Time": 0.000,
                      "Plans": [
                        {
                          "Node Type": "Group",
                          "Parent Relationship": "Outer",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Startup Cost": 591410.73,
                          "Total Cost": 591760.33,
                          "Plan Rows": 69920,
                          "Plan Width": 224,
                          "Actual Startup Time": 504.518,
                          "Actual Total Time": 504.524,
                          "Actual Rows": 9,
                          "Actual Loops": 3,
                          "Output": ["contacts.id", "contacts.name", "contacts.email", "contacts.phone_number", "contacts.account_id", "contacts.created_at", "contacts.updated_at", "contacts.additional_attributes", "contacts.identifier", "contacts.custom_attributes", "contacts.last_activity_at"],
                          "Group Key": ["contacts.id"],
                          "Shared Hit Blocks": 28523,
                          "Shared Read Blocks": 41581,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0,
                          "I/O Read Time": 161.765,
                          "I/O Write Time": 0.000,
                          "Temp I/O Read Time": 0.000,
                          "Temp I/O Write Time": 0.000,
                          "Workers": [
                            {
                              "Worker Number": 0,
                              "Actual Startup Time": 503.322,
                              "Actual Total Time": 503.329,
                              "Actual Rows": 8,
                              "Actual Loops": 1,
                              "Shared Hit Blocks": 8893,
                              "Shared Read Blocks": 10660,
                              "Shared Dirtied Blocks": 0,
                              "Shared Written Blocks": 0,
                              "Local Hit Blocks": 0,
                              "Local Read Blocks": 0,
                              "Local Dirtied Blocks": 0,
                              "Local Written Blocks": 0,
                              "Temp Read Blocks": 0,
                              "Temp Written Blocks": 0,
                              "I/O Read Time": 48.495,
                              "I/O Write Time": 0.000,
                              "Temp I/O Read Time": 0.000,
                              "Temp I/O Write Time": 0.000
                            },
                            {
                              "Worker Number": 1,
                              "Actual Startup Time": 502.023,
                              "Actual Total Time": 502.029,
                              "Actual Rows": 8,
                              "Actual Loops": 1,
                              "Shared Hit Blocks": 8393,
                              "Shared Read Blocks": 10096,
                              "Shared Dirtied Blocks": 0,
                              "Shared Written Blocks": 0,
                              "Local Hit Blocks": 0,
                              "Local Read Blocks": 0,
                              "Local Dirtied Blocks": 0,
                              "Local Written Blocks": 0,
                              "Temp Read Blocks": 0,
                              "Temp Written Blocks": 0,
                              "I/O Read Time": 63.143,
                              "I/O Write Time": 0.000,
                              "Temp I/O Read Time": 0.000,
                              "Temp I/O Write Time": 0.000
                            }
                          ],
                          "Plans": [
                            {
                              "Node Type": "Sort",
                              "Parent Relationship": "Outer",
                              "Parallel Aware": false,
                              "Async Capable": false,
                              "Startup Cost": 591410.73,
                              "Total Cost": 591585.53,
                              "Plan Rows": 69920,
                              "Plan Width": 224,
                              "Actual Startup Time": 504.514,
                              "Actual Total Time": 504.516,
                              "Actual Rows": 9,
                              "Actual Loops": 3,
                              "Output": ["contacts.id", "contacts.name", "contacts.email", "contacts.phone_number", "contacts.account_id", "contacts.created_at", "contacts.updated_at", "contacts.additional_attributes", "contacts.identifier", "contacts.custom_attributes", "contacts.last_activity_at"],
                              "Sort Key": ["contacts.id"],
                              "Sort Method": "quicksort",
                              "Sort Space Used": 26,
                              "Sort Space Type": "Memory",
                              "Shared Hit Blocks": 28523,
                              "Shared Read Blocks": 41581,
                              "Shared Dirtied Blocks": 0,
                              "Shared Written Blocks": 0,
                              "Local Hit Blocks": 0,
                              "Local Read Blocks": 0,
                              "Local Dirtied Blocks": 0,
                              "Local Written Blocks": 0,
                              "Temp Read Blocks": 0,
                              "Temp Written Blocks": 0,
                              "I/O Read Time": 161.765,
                              "I/O Write Time": 0.000,
                              "Temp I/O Read Time": 0.000,
                              "Temp I/O Write Time": 0.000,
                              "Workers": [
                                {
                                  "Worker Number": 0,
                                  "Actual Startup Time": 503.318,
                                  "Actual Total Time": 503.320,
                                  "Actual Rows": 8,
                                  "Actual Loops": 1,
                                  "Sort Method": "quicksort",
                                  "Sort Space Used": 26,
                                  "Sort Space Type": "Memory",
                                  "Shared Hit Blocks": 8893,
                                  "Shared Read Blocks": 10660,
                                  "Shared Dirtied Blocks": 0,
                                  "Shared Written Blocks": 0,
                                  "Local Hit Blocks": 0,
                                  "Local Read Blocks": 0,
                                  "Local Dirtied Blocks": 0,
                                  "Local Written Blocks": 0,
                                  "Temp Read Blocks": 0,
                                  "Temp Written Blocks": 0,
                                  "I/O Read Time": 48.495,
                                  "I/O Write Time": 0.000,
                                  "Temp I/O Read Time": 0.000,
                                  "Temp I/O Write Time": 0.000
                                },
                                {
                                  "Worker Number": 1,
                                  "Actual Startup Time": 502.020,
                                  "Actual Total Time": 502.022,
                                  "Actual Rows": 8,
                                  "Actual Loops": 1,
                                  "Sort Method": "quicksort",
                                  "Sort Space Used": 26,
                                  "Sort Space Type": "Memory",
                                  "Shared Hit Blocks": 8393,
                                  "Shared Read Blocks": 10096,
                                  "Shared Dirtied Blocks": 0,
                                  "Shared Written Blocks": 0,
                                  "Local Hit Blocks": 0,
                                  "Local Read Blocks": 0,
                                  "Local Dirtied Blocks": 0,
                                  "Local Written Blocks": 0,
                                  "Temp Read Blocks": 0,
                                  "Temp Written Blocks": 0,
                                  "I/O Read Time": 63.143,
                                  "I/O Write Time": 0.000,
                                  "Temp I/O Read Time": 0.000,
                                  "Temp I/O Write Time": 0.000
                                }
                              ],
                              "Plans": [
                                {
                                  "Node Type": "Bitmap Heap Scan",
                                  "Parent Relationship": "Outer",
                                  "Parallel Aware": true,
                                  "Async Capable": false,
                                  "Relation Name": "contacts",
                                  "Schema": "public",
                                  "Alias": "contacts",
                                  "Startup Cost": 2084.95,
                                  "Total Cost": 578374.97,
                                  "Plan Rows": 69920,
                                  "Plan Width": 224,
                                  "Actual Startup Time": 102.759,
                                  "Actual Total Time": 504.473,
                                  "Actual Rows": 9,
                                  "Actual Loops": 3,
                                  "Output": ["contacts.id", "contacts.name", "contacts.email", "contacts.phone_number", "contacts.account_id", "contacts.created_at", "contacts.updated_at", "contacts.additional_attributes", "contacts.identifier", "contacts.custom_attributes", "contacts.last_activity_at"],
                                  "Recheck Cond": "(contacts.account_id = 4173)",
                                  "Rows Removed by Index Recheck": 234995,
                                  "Filter": "(((contacts.email)::text <> ''::text) OR ((contacts.phone_number)::text <> ''::text) OR ((contacts.identifier)::text <> ''::text))",
                                  "Rows Removed by Filter": 993482,
                                  "Exact Heap Blocks": 15487,
                                  "Lossy Heap Blocks": 14064,
                                  "Shared Hit Blocks": 28509,
                                  "Shared Read Blocks": 41581,
                                  "Shared Dirtied Blocks": 0,
                                  "Shared Written Blocks": 0,
                                  "Local Hit Blocks": 0,
                                  "Local Read Blocks": 0,
                                  "Local Dirtied Blocks": 0,
                                  "Local Written Blocks": 0,
                                  "Temp Read Blocks": 0,
                                  "Temp Written Blocks": 0,
                                  "I/O Read Time": 161.765,
                                  "I/O Write Time": 0.000,
                                  "Temp I/O Read Time": 0.000,
                                  "Temp I/O Write Time": 0.000,
                                  "Workers": [
                                    {
                                      "Worker Number": 0,
                                      "Actual Startup Time": 103.532,
                                      "Actual Total Time": 503.275,
                                      "Actual Rows": 8,
                                      "Actual Loops": 1,
                                      "Shared Hit Blocks": 8886,
                                      "Shared Read Blocks": 10660,
                                      "Shared Dirtied Blocks": 0,
                                      "Shared Written Blocks": 0,
                                      "Local Hit Blocks": 0,
                                      "Local Read Blocks": 0,
                                      "Local Dirtied Blocks": 0,
                                      "Local Written Blocks": 0,
                                      "Temp Read Blocks": 0,
                                      "Temp Written Blocks": 0,
                                      "I/O Read Time": 48.495,
                                      "I/O Write Time": 0.000,
                                      "Temp I/O Read Time": 0.000,
                                      "Temp I/O Write Time": 0.000
                                    },
                                    {
                                      "Worker Number": 1,
                                      "Actual Startup Time": 98.472,
                                      "Actual Total Time": 501.977,
                                      "Actual Rows": 8,
                                      "Actual Loops": 1,
                                      "Shared Hit Blocks": 8386,
                                      "Shared Read Blocks": 10096,
                                      "Shared Dirtied Blocks": 0,
                                      "Shared Written Blocks": 0,
                                      "Local Hit Blocks": 0,
                                      "Local Read Blocks": 0,
                                      "Local Dirtied Blocks": 0,
                                      "Local Written Blocks": 0,
                                      "Temp Read Blocks": 0,
                                      "Temp Written Blocks": 0,
                                      "I/O Read Time": 63.143,
                                      "I/O Write Time": 0.000,
                                      "Temp I/O Read Time": 0.000,
                                      "Temp I/O Write Time": 0.000
                                    }
                                  ],
                                  "Plans": [
                                    {
                                      "Node Type": "Bitmap Index Scan",
                                      "Parent Relationship": "Outer",
                                      "Parallel Aware": false,
                                      "Async Capable": false,
                                      "Index Name": "index_contacts_on_account_id",
                                      "Startup Cost": 0.00,
                                      "Total Cost": 2043.00,
                                      "Plan Rows": 167808,
                                      "Plan Width": 0,
                                      "Actual Startup Time": 95.053,
                                      "Actual Total Time": 95.053,
                                      "Actual Rows": 2980474,
                                      "Actual Loops": 1,
                                      "Index Cond": "(contacts.account_id = 4173)",
                                      "Shared Hit Blocks": 0,
                                      "Shared Read Blocks": 2511,
                                      "Shared Dirtied Blocks": 0,
                                      "Shared Written Blocks": 0,
                                      "Local Hit Blocks": 0,
                                      "Local Read Blocks": 0,
                                      "Local Dirtied Blocks": 0,
                                      "Local Written Blocks": 0,
                                      "Temp Read Blocks": 0,
                                      "Temp Written Blocks": 0,
                                      "I/O Read Time": 7.052,
                                      "I/O Write Time": 0.000,
                                      "Temp I/O Read Time": 0.000,
                                      "Temp I/O Write Time": 0.000,
                                      "Workers": [
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "Node Type": "Aggregate",
              "Strategy": "Plain",
              "Partial Mode": "Simple",
              "Parent Relationship": "SubPlan",
              "Subplan Name": "SubPlan 1",
              "Parallel Aware": false,
              "Async Capable": false,
              "Startup Cost": 31335.41,
              "Total Cost": 31335.42,
              "Plan Rows": 1,
              "Plan Width": 8,
              "Actual Startup Time": 0.013,
              "Actual Total Time": 0.014,
              "Actual Rows": 1,
              "Actual Loops": 20,
              "Output": ["count(*)"],
              "Shared Hit Blocks": 62,
              "Shared Read Blocks": 34,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0,
              "I/O Read Time": 0.097,
              "I/O Write Time": 0.000,
              "Temp I/O Read Time": 0.000,
              "Temp I/O Write Time": 0.000,
              "Plans": [
                {
                  "Node Type": "Bitmap Heap Scan",
                  "Parent Relationship": "Outer",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Relation Name": "conversations",
                  "Schema": "public",
                  "Alias": "conversations",
                  "Startup Cost": 245.14,
                  "Total Cost": 31306.80,
                  "Plan Rows": 11446,
                  "Plan Width": 0,
                  "Actual Startup Time": 0.011,
                  "Actual Total Time": 0.012,
                  "Actual Rows": 1,
                  "Actual Loops": 20,
                  "Recheck Cond": "(conversations.contact_id = contacts.id)",
                  "Rows Removed by Index Recheck": 0,
                  "Exact Heap Blocks": 23,
                  "Lossy Heap Blocks": 0,
                  "Shared Hit Blocks": 62,
                  "Shared Read Blocks": 34,
                  "Shared Dirtied Blocks": 0,
                  "Shared Written Blocks": 0,
                  "Local Hit Blocks": 0,
                  "Local Read Blocks": 0,
                  "Local Dirtied Blocks": 0,
                  "Local Written Blocks": 0,
                  "Temp Read Blocks": 0,
                  "Temp Written Blocks": 0,
                  "I/O Read Time": 0.097,
                  "I/O Write Time": 0.000,
                  "Temp I/O Read Time": 0.000,
                  "Temp I/O Write Time": 0.000,
                  "Plans": [
                    {
                      "Node Type": "Bitmap Index Scan",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Index Name": "index_conversations_on_contact_id",
                      "Startup Cost": 0.00,
                      "Total Cost": 242.28,
                      "Plan Rows": 11446,
                      "Plan Width": 0,
                      "Actual Startup Time": 0.008,
                      "Actual Total Time": 0.008,
                      "Actual Rows": 1,
                      "Actual Loops": 20,
                      "Index Cond": "(conversations.contact_id = contacts.id)",
                      "Shared Hit Blocks": 39,
                      "Shared Read Blocks": 21,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "I/O Read Time": 0.063,
                      "I/O Write Time": 0.000,
                      "Temp I/O Read Time": 0.000,
                      "Temp I/O Write Time": 0.000
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    "Query Identifier": -7325315004781393924,
    "Planning": {
      "Shared Hit Blocks": 9,
      "Shared Read Blocks": 0,
      "Shared Dirtied Blocks": 1,
      "Shared Written Blocks": 0,
      "Local Hit Blocks": 0,
      "Local Read Blocks": 0,
      "Local Dirtied Blocks": 0,
      "Local Written Blocks": 0,
      "Temp Read Blocks": 0,
      "Temp Written Blocks": 0,
      "I/O Read Time": 0.000,
      "I/O Write Time": 0.000,
      "Temp I/O Read Time": 0.000,
      "Temp I/O Write Time": 0.000
    },
    "Planning Time": 0.473,
    "Triggers": [
    ],
    "Execution Time": 513.147
  }
]
SELECT
  contacts.*,
  (
    SELECT
      COUNT(*)
    FROM
      "conversations"
    WHERE
      "conversations"."contact_id" = "contacts"."id"
  ) as conversations_count
FROM
  "contacts"
WHERE
  "contacts"."account_id" = 4173
  AND (
    contacts.email <> ''
    OR contacts.phone_number <> ''
    OR contacts.identifier <> ''
  )
GROUP BY
  "contacts"."id"
ORDER BY
  "contacts"."last_activity_at" desc NULLS LAST
LIMIT
  20;
Table Count Time
contacts 1 473ms 92%
#8 Bitmap Heap Scan 473ms 92%
conversations 1 0.08ms 0%
#11 Bitmap Heap Scan 0.08ms 0%
Function Count Time
No function used
Node Type Count Time
Bitmap Heap Scan 2 473ms 92%
#8 Bitmap Heap Scan 473ms 92%
#11 Bitmap Heap Scan 0.08ms 0%
Bitmap Index Scan 2 31.8ms 6%
#9 Bitmap Index Scan 31.7ms 6%
#12 Bitmap Index Scan 0.16ms 0%
Gather Merge 1 8.21ms 2%
#5 Gather Merge 8.21ms 2%
Sort 2 0.068ms 0%
#7 Sort 0.043ms 0%
#3 Sort 0.025ms 0%
Aggregate 1 0.04ms 0%
#10 Aggregate 0.04ms 0%
Group 2 0.023ms 0%
#4 Group 0.015ms 0%
#6 Group 0.008ms 0%
Result 1 0.011ms 0%
#2 Result 0.011ms 0%
Limit 1 0.005ms 0%
#1 Limit 0.005ms 0%
Index Count Time
index_contacts_on_account_id 1 31.7ms 6%
#9 Bitmap Index Scan 31.7ms 6%
index_conversations_on_contact_id 1 0.16ms 0%
#12 Bitmap Index Scan 0.16ms 0%