|
117,219 min
94%
|
154 ms
|
45,810,529
flightcontrol
|
SELECT "good_jobs"."id", "good_jobs"."queue_name", "good_jobs"."priority", "good_jobs"."serialized_params", "good_jobs"."scheduled_at", "good_jobs"."performed_at", "good_jobs"."finished_at", "good_jobs"."error", "good_jobs"."created_at", "good_jobs"."updated_at", "good_jobs"."active_job_id", "good_jobs"."concurrency_key", "good_jobs"."cron_key", "good_jobs"."cron_at", "good_jobs"."batch_id", "good_jobs"."batch_callback_id", "good_jobs"."executions_count", "good_jobs"."job_class", "good_jobs"."error_event", "good_jobs"."labels", "good_jobs"."locked_by_id", "good_jobs"."locked_at" FROM "good_jobs" WHERE "good_jobs"."id" IN (WITH "rows" AS MATERIALIZED (SELECT "good_jobs"."id" FROM "good_jobs" WHERE "good_jobs"."finished_at" IS NULL AND "good_jobs"."scheduled_at" <= $1 ORDER BY priority ASC NULLS LAST, "good_jobs"."created_at" ASC) SELECT "rows"."id" FROM "rows" WHERE pg_try_advisory_lock(($3 || substr(md5($4 || $5 || "rows"."id"::text), $6, $7))::bit(64)::bigint) LIMIT $2) ORDER BY priority ASC NULLS LAST, "good_jobs"."created_at" ASC
|
|
4,167 min
3%
|
15 ms
|
17,113,244
flightcontrol
|
SELECT pg_advisory_xact_lock(($2||substr(md5($1::text), $3, $4))::bit(64)::bigint)::text AS locked
|
|
567 min
0.5%
|
40 ms
|
853,875
flightcontrol
|
SELECT COUNT(*) FROM "good_jobs" WHERE "good_jobs"."concurrency_key" = $1 AND "good_jobs"."created_at" > $2
Covered by index on (concurrency_key, created_at)
Rows: 450254
Row progression: 450254, 96, 10
Row estimates
- concurrency_key (=): 96
- created_at (>): 45026
Existing indexes
- id PRIMARY
- active_job_id, created_at
- batch_callback_id WHERE batch_callback_id IS NOT NULL
- batch_id WHERE batch_id IS NOT NULL
- concurrency_key, created_at
- concurrency_key WHERE finished_at IS NULL
- cron_key, created_at WHERE cron_key IS NOT NULL
- cron_key, cron_at WHERE cron_key IS NOT NULL UNIQUE
- finished_at WHERE finished_at IS NOT NULL
- job_class
- labels WHERE labels IS NOT NULL GIN
- locked_by_id WHERE locked_by_id IS NOT NULL
- priority, created_at WHERE finished_at IS NULL
- priority, scheduled_at WHERE (finished_at IS NULL) AND (locked_by_id IS NULL)
- priority DESC NULLS LAST, created_at WHERE finished_at IS NULL
- queue_name, scheduled_at WHERE finished_at IS NULL
- scheduled_at WHERE finished_at IS NULL
|
|
506 min
0.4%
|
53 ms
|
570,021
flightcontrol
|
SELECT "good_job_executions"."active_job_id" FROM "good_job_executions" INNER JOIN "good_jobs" ON "good_jobs"."id" = "good_job_executions"."active_job_id" WHERE "good_jobs"."concurrency_key" = $1 AND "good_job_executions"."created_at" > $2 AND ("good_job_executions"."error" IS NULL OR "good_job_executions"."error" != $3) ORDER BY "good_job_executions"."created_at" ASC LIMIT $4
|
|
358 min
0.3%
|
29 ms
|
735,386
flightcontrol
|
UPDATE "conversations" SET "sla_breach_last_checked_at" = $1 WHERE "conversations"."id" = $2
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
198 min
0.2%
|
1 ms
|
9,167,132
flightcontrol
|
SELECT COUNT(*) FROM "good_jobs" LEFT JOIN pg_locks ON pg_locks.locktype = $2 AND pg_locks.objsubid = $3 AND pg_locks.classid = ($4 || substr(md5($5 || $6 || "good_jobs"."id"::text), $7, $8))::bit(32)::int AND pg_locks.objid = (($9 || substr(md5($10 || $11 || "good_jobs"."id"::text), $12, $13))::bit(64) << $14)::bit(32)::int WHERE "good_jobs"."concurrency_key" = $1 AND "good_jobs"."finished_at" IS NULL AND "pg_locks"."locktype" IS NULL
|
|
109 min
< 0.1%
|
2 ms
|
3,362,073
flightcontrol
|
INSERT INTO "sessions" ("session_id", "data", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"
|
|
100 min
< 0.1%
|
2 ms
|
2,984,137
flightcontrol
|
SELECT "good_jobs"."active_job_id" FROM "good_jobs" LEFT JOIN pg_locks ON pg_locks.locktype = $3 AND pg_locks.objsubid = $4 AND pg_locks.classid = ($5 || substr(md5($6 || $7 || "good_jobs"."id"::text), $8, $9))::bit(32)::int AND pg_locks.objid = (($10 || substr(md5($11 || $12 || "good_jobs"."id"::text), $13, $14))::bit(64) << $15)::bit(32)::int WHERE "good_jobs"."finished_at" IS NULL AND "good_jobs"."concurrency_key" = $1 AND "pg_locks"."locktype" IS NOT NULL ORDER BY COALESCE(performed_at, scheduled_at, created_at) ASC LIMIT $2
|
|
80 min
< 0.1%
|
347 ms
|
13,825
flightcontrol
|
SELECT "clients".* FROM "clients" WHERE "clients"."organization_id" = $1 AND "clients"."phone" = $2 LIMIT $3
Details
CREATE INDEX CONCURRENTLY ON clients (phone)
Rows: 743769
Row progression: 743769, 1
Row estimates
- phone (=): 1
- organization_id (=): 148754
Existing indexes
- id PRIMARY
- data_source_id
- organization_data_source_id
- organization_id
- organization_id, data_source_id, data_source_uid WHERE (data_source_id IS NOT NULL) AND (data_source_uid IS NOT NULL) UNIQUE
- organization_id, user_id WHERE user_id IS NOT NULL UNIQUE
- public_id UNIQUE
|
|
78 min
< 0.1%
|
2 ms
|
1,871,742
flightcontrol
|
SELECT $5 AS one FROM "jira_issues" WHERE "jira_issues"."issue_key" = $1 AND "jira_issues"."id" != $2 AND "jira_issues"."organization_data_source_id" = $3 LIMIT $4
Details
CREATE INDEX CONCURRENTLY ON jira_issues (issue_key)
Rows: 24664
Row progression: 24664, 1
Row estimates
- issue_key (=): 1
- organization_data_source_id (=): 6166
- id (<>): 24663
Existing indexes
- id PRIMARY
- created_by_id
- jira_issue_draft_id
- jira_request_type_id
- organization_data_source_id
- organization_id
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
78 min
< 0.1%
|
1 ms
|
7,438,315
flightcontrol
|
INSERT INTO "good_job_executions" ("created_at", "updated_at", "active_job_id", "job_class", "queue_name", "serialized_params", "scheduled_at", "finished_at", "error", "error_event", "error_backtrace", "process_id", "duration") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) RETURNING "id"
|
|
76 min
< 0.1%
|
25 ms
|
181,578
flightcontrol
|
SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment,
attidentity AS identity,
attgenerated as attgenerated
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
WHERE a.attrelid = $1::regclass
AND a.attnum > $2 AND NOT a.attisdropped
ORDER BY a.attnum
|
|
70 min
< 0.1%
|
6 ms
|
735,392
flightcontrol
|
SELECT "conversation_parts".* FROM "conversation_parts" WHERE "conversation_parts"."organization_id" = $1 AND "conversation_parts"."conversation_id" = $2 AND "conversation_parts"."author_type" = $3 AND "conversation_parts"."type" IN ($4, $5) AND "conversation_parts"."external_created_at" IS NOT NULL ORDER BY "conversation_parts"."external_created_at" ASC
Details
CREATE INDEX CONCURRENTLY ON conversation_parts (conversation_id, type)
Rows: 26367628
Row progression: 26367628, 139, 15
Row estimates
- conversation_id (=): 139
- type (=): 2929736
- organization_id (=): 4394605
- author_type (=): 13183814
- external_created_at (not_null): 26367628
- external_created_at (sort): 19
Existing indexes
- id PRIMARY
- author_client_id
- author_employee_id
- author_employee_id, author_type
- conversation_id
- conversation_id, author_type
- data_source_id
- external_created_at
- organization_data_source_id
- organization_data_source_id, external_id WHERE (organization_data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id
- organization_id, data_source_id, conversation_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- public_id UNIQUE
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- type
|
|
64 min
< 0.1%
|
199 ms
|
19,173
flightcontrol
|
SELECT "good_jobs"."active_job_id" FROM "good_jobs" WHERE "good_jobs"."finished_at" <= $1 ORDER BY "good_jobs"."finished_at" ASC LIMIT $2
Details
CREATE INDEX CONCURRENTLY ON good_jobs (finished_at)
Rows: 450254
Row progression: 450254, 30846
Row estimates
- finished_at (<=): 30846
- finished_at (sort): 1
Existing indexes
- id PRIMARY
- active_job_id, created_at
- batch_callback_id WHERE batch_callback_id IS NOT NULL
- batch_id WHERE batch_id IS NOT NULL
- concurrency_key, created_at
- concurrency_key WHERE finished_at IS NULL
- cron_key, created_at WHERE cron_key IS NOT NULL
- cron_key, cron_at WHERE cron_key IS NOT NULL UNIQUE
- finished_at WHERE finished_at IS NOT NULL
- job_class
- labels WHERE labels IS NOT NULL GIN
- locked_by_id WHERE locked_by_id IS NOT NULL
- priority, created_at WHERE finished_at IS NULL
- priority, scheduled_at WHERE (finished_at IS NULL) AND (locked_by_id IS NULL)
- priority DESC NULLS LAST, created_at WHERE finished_at IS NULL
- queue_name, scheduled_at WHERE finished_at IS NULL
- scheduled_at WHERE finished_at IS NULL
|
|
63 min
< 0.1%
|
55 ms
|
68,620
flightcontrol
|
SELECT EXTRACT($1 FROM NOW() - MIN(created_at)) AS latency_seconds FROM good_jobs WHERE finished_at IS NULL AND scheduled_at <= NOW()
Details
CREATE INDEX CONCURRENTLY ON good_jobs (scheduled_at)
Rows: 450254
Row progression: 450254, 45026
Row estimates
- scheduled_at (<=): 45026
- finished_at (null): 141800
Existing indexes
- id PRIMARY
- active_job_id, created_at
- batch_callback_id WHERE batch_callback_id IS NOT NULL
- batch_id WHERE batch_id IS NOT NULL
- concurrency_key, created_at
- concurrency_key WHERE finished_at IS NULL
- cron_key, created_at WHERE cron_key IS NOT NULL
- cron_key, cron_at WHERE cron_key IS NOT NULL UNIQUE
- finished_at WHERE finished_at IS NOT NULL
- job_class
- labels WHERE labels IS NOT NULL GIN
- locked_by_id WHERE locked_by_id IS NOT NULL
- priority, created_at WHERE finished_at IS NULL
- priority, scheduled_at WHERE (finished_at IS NULL) AND (locked_by_id IS NULL)
- priority DESC NULLS LAST, created_at WHERE finished_at IS NULL
- queue_name, scheduled_at WHERE finished_at IS NULL
- scheduled_at WHERE finished_at IS NULL
|
|
63 min
< 0.1%
|
13 ms
|
296,866
flightcontrol
|
UPDATE "conversations" SET "updated_at" = $1, "transcript" = $2 WHERE "conversations"."id" = $3
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
55 min
< 0.1%
|
1 ms
|
3,573,646
flightcontrol
|
SELECT $4 AS one FROM "conversation_parts" WHERE "conversation_parts"."organization_id" = $1 AND "conversation_parts"."public_id" = $2 LIMIT $3
Covered by index on (public_id)
Rows: 26367628
Row progression: 26367628, 1
Row estimates
- public_id (=): 1
- organization_id (=): 4394605
Existing indexes
- id PRIMARY
- author_client_id
- author_employee_id
- author_employee_id, author_type
- conversation_id
- conversation_id, author_type
- data_source_id
- external_created_at
- organization_data_source_id
- organization_data_source_id, external_id WHERE (organization_data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id
- organization_id, data_source_id, conversation_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- public_id UNIQUE
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- type
|
|
52 min
< 0.1%
|
1 ms
|
2,651,741
flightcontrol
|
INSERT INTO "active_storage_blobs" ("key", "filename", "content_type", "metadata", "service_name", "byte_size", "checksum", "created_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"
|
|
47 min
< 0.1%
|
0 ms
|
6,220,219
flightcontrol
|
INSERT INTO "good_jobs" ("id", "queue_name", "priority", "serialized_params", "scheduled_at", "performed_at", "finished_at", "error", "created_at", "updated_at", "active_job_id", "concurrency_key", "cron_key", "cron_at", "batch_id", "batch_callback_id", "executions_count", "job_class", "error_event", "labels", "locked_by_id", "locked_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22) RETURNING "id"
|
|
39 min
< 0.1%
|
1 ms
|
3,567,704
flightcontrol
|
INSERT INTO "conversation_parts" ("organization_id", "public_id", "conversation_id", "author_type", "type", "created_at", "updated_at", "reference_id", "external_created_at", "data_source_id", "external_id", "author_client_id", "author_employee_id", "author_name", "image_attached", "image_caption", "body", "html_body", "body_english", "organization_data_source_id", "redacted_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21) RETURNING "id"
|
|
37 min
< 0.1%
|
3 ms
|
894,024
flightcontrol
|
SELECT "jira_issues".* FROM "jira_issues" WHERE "jira_issues"."organization_id" = $1 AND "jira_issues"."organization_data_source_id" = $2 AND "jira_issues"."issue_key" = $3 LIMIT $4
Details
CREATE INDEX CONCURRENTLY ON jira_issues (issue_key)
Rows: 24664
Row progression: 24664, 1
Row estimates
- issue_key (=): 1
- organization_data_source_id (=): 6166
- organization_id (=): 6166
Existing indexes
- id PRIMARY
- created_by_id
- jira_issue_draft_id
- jira_request_type_id
- organization_data_source_id
- organization_id
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
37 min
< 0.1%
|
7 ms
|
305,664
flightcontrol
|
UPDATE "conversations" SET "updated_at" = $1, "translation_state" = $2 WHERE "conversations"."id" = $3
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
36 min
< 0.1%
|
11 ms
|
187,564
flightcontrol
|
UPDATE "conversations" SET "updated_at" = $1, "evaluation_state" = $2 WHERE "conversations"."id" = $3
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
33 min
< 0.1%
|
0 ms
|
43,709,743
flightcontrol
|
SELECT "conversation_field_values".* FROM "conversation_field_values" WHERE "conversation_field_values"."organization_id" = $1 AND "conversation_field_values"."conversation_id" = $2 AND "conversation_field_values"."conversation_field_id" = $3 LIMIT $4
Covered by index on (conversation_id)
Rows: 2367749
Row progression: 2367749, 27
Row estimates
- conversation_id (=): 27
- conversation_field_id (=): 11958
- organization_id (=): 789250
Existing indexes
- id PRIMARY
- conversation_field_id
- conversation_id
- conversation_id, conversation_field_id UNIQUE
- organization_id
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
31 min
< 0.1%
|
0 ms
|
7,438,138
flightcontrol
|
UPDATE "good_jobs" SET "performed_at" = $1, "updated_at" = $2, "executions_count" = $3, "locked_by_id" = $4, "locked_at" = $5 WHERE "good_jobs"."id" = $6
Covered by index on (id)
Rows: 450254
Row progression: 450254, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_job_id, created_at
- batch_callback_id WHERE batch_callback_id IS NOT NULL
- batch_id WHERE batch_id IS NOT NULL
- concurrency_key, created_at
- concurrency_key WHERE finished_at IS NULL
- cron_key, created_at WHERE cron_key IS NOT NULL
- cron_key, cron_at WHERE cron_key IS NOT NULL UNIQUE
- finished_at WHERE finished_at IS NOT NULL
- job_class
- labels WHERE labels IS NOT NULL GIN
- locked_by_id WHERE locked_by_id IS NOT NULL
- priority, created_at WHERE finished_at IS NULL
- priority, scheduled_at WHERE (finished_at IS NULL) AND (locked_by_id IS NULL)
- priority DESC NULLS LAST, created_at WHERE finished_at IS NULL
- queue_name, scheduled_at WHERE finished_at IS NULL
- scheduled_at WHERE finished_at IS NULL
|
|
31 min
< 0.1%
|
0 ms
|
11,998,219
flightcontrol
|
SELECT "conversation_part_chat_details".* FROM "conversation_part_chat_details" WHERE "conversation_part_chat_details"."organization_id" = $1 AND "conversation_part_chat_details"."conversation_part_id" = $2 LIMIT $3
Covered by index on (conversation_part_id)
Rows: 13407744
Row progression: 13407744, 1
Row estimates
- conversation_part_id (=): 1
- organization_id (=): 2234624
Existing indexes
- id PRIMARY
- conversation_part_id
- organization_id
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
29 min
< 0.1%
|
1 ms
|
1,839,472
flightcontrol
|
SELECT $3 AS one FROM "good_jobs" WHERE "good_jobs"."batch_id" = $1 AND "good_jobs"."finished_at" IS NULL LIMIT $2
Details
CREATE INDEX CONCURRENTLY ON good_jobs (batch_id)
Rows: 450254
Row progression: 450254, 8
Row estimates
- batch_id (=): 8
- finished_at (null): 141800
Existing indexes
- id PRIMARY
- active_job_id, created_at
- batch_callback_id WHERE batch_callback_id IS NOT NULL
- batch_id WHERE batch_id IS NOT NULL
- concurrency_key, created_at
- concurrency_key WHERE finished_at IS NULL
- cron_key, created_at WHERE cron_key IS NOT NULL
- cron_key, cron_at WHERE cron_key IS NOT NULL UNIQUE
- finished_at WHERE finished_at IS NOT NULL
- job_class
- labels WHERE labels IS NOT NULL GIN
- locked_by_id WHERE locked_by_id IS NOT NULL
- priority, created_at WHERE finished_at IS NULL
- priority, scheduled_at WHERE (finished_at IS NULL) AND (locked_by_id IS NULL)
- priority DESC NULLS LAST, created_at WHERE finished_at IS NULL
- queue_name, scheduled_at WHERE finished_at IS NULL
- scheduled_at WHERE finished_at IS NULL
|
|
24 min
< 0.1%
|
0 ms
|
6,230,241
flightcontrol
|
UPDATE "good_job_executions" SET "updated_at" = $1, "finished_at" = $2, "duration" = $3 WHERE "good_job_executions"."id" = $4
Covered by index on (id)
Rows: 690224
Row progression: 690224, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_job_id, created_at
- process_id, created_at
|
|
21 min
< 0.1%
|
8 ms
|
153,236
flightcontrol
|
UPDATE "conversations" SET "updated_at" = $1, "transcription_state" = $2 WHERE "conversations"."id" = $3
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
21 min
< 0.1%
|
0 ms
|
40,691,943
flightcontrol
|
SELECT "conversation_fields".* FROM "conversation_fields" WHERE "conversation_fields"."organization_id" = $1 AND "conversation_fields"."external_id" = $2 AND "conversation_fields"."organization_data_source_id" = $3 LIMIT $4
Details
CREATE INDEX CONCURRENTLY ON conversation_fields (external_id)
Rows: 530
Row progression: 530, 1
Row estimates
- external_id (=): 1
- organization_data_source_id (=): 76
- organization_id (=): 88
Existing indexes
- id PRIMARY
- organization_data_source_id
- organization_data_source_id, external_id UNIQUE
- organization_id
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
19 min
< 0.1%
|
82 ms
|
13,957
flightcontrol
|
DELETE FROM "good_job_batches" WHERE ("good_job_batches"."id") IN (SELECT "good_job_batches"."id" FROM "good_job_batches" WHERE "good_job_batches"."finished_at" <= $1 LIMIT $2)
|
|
18 min
< 0.1%
|
0 ms
|
11,850,647
flightcontrol
|
SELECT "good_jobs"."id", "good_jobs"."queue_name", "good_jobs"."priority", "good_jobs"."serialized_params", "good_jobs"."scheduled_at", "good_jobs"."performed_at", "good_jobs"."finished_at", "good_jobs"."error", "good_jobs"."created_at", "good_jobs"."updated_at", "good_jobs"."active_job_id", "good_jobs"."concurrency_key", "good_jobs"."cron_key", "good_jobs"."cron_at", "good_jobs"."batch_id", "good_jobs"."batch_callback_id", "good_jobs"."executions_count", "good_jobs"."job_class", "good_jobs"."error_event", "good_jobs"."labels", "good_jobs"."locked_by_id", "good_jobs"."locked_at" FROM "good_jobs" WHERE "good_jobs"."id" = $1 LIMIT $2
Covered by index on (id)
Rows: 450254
Row progression: 450254, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_job_id, created_at
- batch_callback_id WHERE batch_callback_id IS NOT NULL
- batch_id WHERE batch_id IS NOT NULL
- concurrency_key, created_at
- concurrency_key WHERE finished_at IS NULL
- cron_key, created_at WHERE cron_key IS NOT NULL
- cron_key, cron_at WHERE cron_key IS NOT NULL UNIQUE
- finished_at WHERE finished_at IS NOT NULL
- job_class
- labels WHERE labels IS NOT NULL GIN
- locked_by_id WHERE locked_by_id IS NOT NULL
- priority, created_at WHERE finished_at IS NULL
- priority, scheduled_at WHERE (finished_at IS NULL) AND (locked_by_id IS NULL)
- priority DESC NULLS LAST, created_at WHERE finished_at IS NULL
- queue_name, scheduled_at WHERE finished_at IS NULL
- scheduled_at WHERE finished_at IS NULL
|
|
17 min
< 0.1%
|
0 ms
|
26,705,967
flightcontrol
|
SELECT $6 AS one FROM "conversation_parts" WHERE "conversation_parts"."organization_id" = $1 AND "conversation_parts"."conversation_id" = $2 AND "conversation_parts"."data_source_id" = $3 AND "conversation_parts"."external_id" = $4 LIMIT $5
Details
CREATE INDEX CONCURRENTLY ON conversation_parts (external_id)
Rows: 26367628
Row progression: 26367628, 1
Row estimates
- external_id (=): 1
- conversation_id (=): 139
- data_source_id (=): 3765172
- organization_id (=): 4394605
Existing indexes
- id PRIMARY
- author_client_id
- author_employee_id
- author_employee_id, author_type
- conversation_id
- conversation_id, author_type
- data_source_id
- external_created_at
- organization_data_source_id
- organization_data_source_id, external_id WHERE (organization_data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id
- organization_id, data_source_id, conversation_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- public_id UNIQUE
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- type
|
|
17 min
< 0.1%
|
11 ms
|
92,451
flightcontrol
|
UPDATE "conversations" SET "evaluation_state" = $1, "updated_at" = $2 WHERE "conversations"."id" = $3
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
16 min
< 0.1%
|
1 ms
|
924,950
flightcontrol
|
SELECT $4 AS one FROM "conversation_part_chat_details" WHERE "conversation_part_chat_details"."organization_id" = $1 AND "conversation_part_chat_details"."public_id" = $2 LIMIT $3
Details
CREATE INDEX CONCURRENTLY ON conversation_part_chat_details (public_id)
Rows: 13407744
Row progression: 13407744, 1
Row estimates
- public_id (=): 1
- organization_id (=): 2234624
Existing indexes
- id PRIMARY
- conversation_part_id
- organization_id
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
15 min
< 0.1%
|
2 ms
|
382,849
flightcontrol
|
UPDATE "conversations" SET "updated_at" = $1, "conversation_thread_id" = $2 WHERE "conversations"."id" = $3
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
15 min
< 0.1%
|
0 ms
|
3,296,930
flightcontrol
|
SELECT "conversation_part_notes".* FROM "conversation_part_notes" WHERE "conversation_part_notes"."organization_id" = $1 AND "conversation_part_notes"."conversation_part_id" = $2 LIMIT $3
Covered by index on (conversation_part_id)
Rows: 2189214
Row progression: 2189214, 1
Row estimates
- conversation_part_id (=): 1
- organization_id (=): 364869
Existing indexes
- id PRIMARY
- conversation_part_id UNIQUE
- organization_id
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
14 min
< 0.1%
|
0 ms
|
5,754,656
flightcontrol
|
UPDATE "good_jobs" SET "locked_by_id" = $1, "locked_at" = $2, "finished_at" = $3, "updated_at" = $4 WHERE "good_jobs"."id" = $5
Covered by index on (id)
Rows: 450254
Row progression: 450254, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_job_id, created_at
- batch_callback_id WHERE batch_callback_id IS NOT NULL
- batch_id WHERE batch_id IS NOT NULL
- concurrency_key, created_at
- concurrency_key WHERE finished_at IS NULL
- cron_key, created_at WHERE cron_key IS NOT NULL
- cron_key, cron_at WHERE cron_key IS NOT NULL UNIQUE
- finished_at WHERE finished_at IS NOT NULL
- job_class
- labels WHERE labels IS NOT NULL GIN
- locked_by_id WHERE locked_by_id IS NOT NULL
- priority, created_at WHERE finished_at IS NULL
- priority, scheduled_at WHERE (finished_at IS NULL) AND (locked_by_id IS NULL)
- priority DESC NULLS LAST, created_at WHERE finished_at IS NULL
- queue_name, scheduled_at WHERE finished_at IS NULL
- scheduled_at WHERE finished_at IS NULL
|
|
14 min
< 0.1%
|
0 ms
|
16,903,974
flightcontrol
|
SELECT "conversation_part_attribute_updated_by_admins".* FROM "conversation_part_attribute_updated_by_admins" WHERE "conversation_part_attribute_updated_by_admins"."organization_id" = $1 AND "conversation_part_attribute_updated_by_admins"."conversation_part_id" = $2 LIMIT $3
Covered by index on (conversation_part_id)
Rows: 7101738
Row progression: 7101738, 1
Row estimates
- conversation_part_id (=): 1
- organization_id (=): 1775435
Existing indexes
- id PRIMARY
- conversation_part_id
- organization_id
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
14 min
< 0.1%
|
0 ms
|
3,360,148
flightcontrol
|
UPDATE "sessions" SET "data" = $1, "updated_at" = $2 WHERE "sessions"."id" = $3
Covered by index on (id)
Rows: 3074505
Row progression: 3074505, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- session_id UNIQUE
- updated_at
|
|
14 min
< 0.1%
|
17 ms
|
49,586
flightcontrol
|
UPDATE "conversations" SET "updated_at" = $1, "closed_at" = $2 WHERE "conversations"."id" = $3
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
12 min
< 0.1%
|
0 ms
|
3,355,429
flightcontrol
|
UPDATE "conversation_field_values" SET "value" = $1, "updated_at" = $2 WHERE "conversation_field_values"."id" = $3
Covered by index on (id)
Rows: 2367749
Row progression: 2367749, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- conversation_field_id
- conversation_id
- conversation_id, conversation_field_id UNIQUE
- organization_id
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
12 min
< 0.1%
|
9 ms
|
78,541
flightcontrol
|
UPDATE "conversations" SET "updated_at" = $1, "ticket_status" = $2 WHERE "conversations"."id" = $3
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
11 min
< 0.1%
|
0 ms
|
25,740,516
flightcontrol
|
SELECT "conversation_fields".* FROM "conversation_fields" WHERE "conversation_fields"."organization_id" = $1 AND "conversation_fields"."id" = $2 LIMIT $3
Covered by index on (id)
Rows: 530
Row progression: 530, 1
Row estimates
- id (=): 1
- organization_id (=): 88
Existing indexes
- id PRIMARY
- organization_data_source_id
- organization_data_source_id, external_id UNIQUE
- organization_id
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
11 min
< 0.1%
|
0 ms
|
21,735,657
flightcontrol
|
SELECT "company_fields".* FROM "company_fields" WHERE "company_fields"."organization_id" = $1 AND "company_fields"."name" = $2 AND "company_fields"."organization_data_source_id" = $3 LIMIT $4
|
|
11 min
< 0.1%
|
0 ms
|
21,749,394
flightcontrol
|
SELECT "company_field_values".* FROM "company_field_values" WHERE "company_field_values"."organization_id" = $1 AND "company_field_values"."company_id" = $2 AND "company_field_values"."company_field_id" = $3 LIMIT $4
Covered by index on (company_id, company_field_id)
Rows: 1708766
Row progression: 1708766, 23
Row estimates
- company_id (=): 23
- company_field_id (=): 27123
- organization_id (=): 854383
Existing indexes
- id PRIMARY
- company_field_id
- company_id
- company_id, company_field_id UNIQUE
- organization_id
|
|
10 min
< 0.1%
|
0 ms
|
1,994,660
flightcontrol
|
INSERT INTO "conversation_field_values" ("organization_id", "conversation_id", "conversation_field_id", "public_id", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"
|
|
9 min
< 0.1%
|
17 ms
|
30,698
flightcontrol
|
UPDATE "conversations" SET "sla_breaches_count" = COALESCE("sla_breaches_count", $3) + $4 WHERE "conversations"."organization_id" = $1 AND "conversations"."id" = $2
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
- organization_id (=): 317697
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
8 min
< 0.1%
|
0 ms
|
1,960,593
flightcontrol
|
UPDATE "conversation_part_attribute_updated_by_admins" SET "public_id" = $1, "updated_at" = $2 WHERE "conversation_part_attribute_updated_by_admins"."id" = $3
Covered by index on (id)
Rows: 7101738
Row progression: 7101738, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- conversation_part_id
- organization_id
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
8 min
< 0.1%
|
11 ms
|
44,661
flightcontrol
|
UPDATE "conversations" SET "updated_at" = $1, "qa_score_updated_at" = $2 WHERE "conversations"."id" = $3
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
8 min
< 0.1%
|
0 ms
|
1,660,421
flightcontrol
|
SELECT "conversation_parts".* FROM "conversation_parts" LEFT OUTER JOIN "employees" ON "employees"."organization_id" = $1 AND "employees"."id" = "conversation_parts"."author_employee_id" WHERE "conversation_parts"."organization_id" = $2 AND "conversation_parts"."conversation_id" = $3 AND (author_employee_id IS NULL OR employees.excluded_from_conversation_parts = $4) ORDER BY "conversation_parts"."external_created_at" ASC, "conversation_parts"."created_at" ASC
|
|
8 min
< 0.1%
|
0 ms
|
9,675,459
flightcontrol
|
SELECT "flipper_features"."key" AS feature_key, "flipper_gates"."key", "flipper_gates"."value" FROM "flipper_features" LEFT OUTER JOIN "flipper_gates" ON "flipper_features"."key" = "flipper_gates"."feature_key"
|
|
7 min
< 0.1%
|
4 ms
|
125,467
flightcontrol
|
UPDATE "conversations" SET "updated_at" = $1, "requester_id" = $2 WHERE "conversations"."id" = $3
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
7 min
< 0.1%
|
0 ms
|
1,207,862
flightcontrol
|
UPDATE "good_job_executions" SET "updated_at" = $1, "finished_at" = $2, "error" = $3, "error_event" = $4, "error_backtrace" = $5, "duration" = $6 WHERE "good_job_executions"."id" = $7
Covered by index on (id)
Rows: 690224
Row progression: 690224, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_job_id, created_at
- process_id, created_at
|
|
7 min
< 0.1%
|
0 ms
|
1,994,660
flightcontrol
|
UPDATE "conversation_field_values" SET "public_id" = $1, "updated_at" = $2 WHERE "conversation_field_values"."id" = $3
Covered by index on (id)
Rows: 2367749
Row progression: 2367749, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- conversation_field_id
- conversation_id
- conversation_id, conversation_field_id UNIQUE
- organization_id
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
7 min
< 0.1%
|
485 ms
|
873
flightcontrol
|
SELECT "conversations"."id", "conversations"."organization_id", "conversations"."public_id", "conversations"."employee_id", "conversations"."client_id", "conversations"."customer_account_id", "conversations"."reference_id", "conversations"."created_at", "conversations"."updated_at", "conversations"."review_completed_at", "conversations"."started_at", "conversations"."ended_at", "conversations"."transcript", "conversations"."summary", "conversations"."previous_context", "conversations"."previous_sentiment_score", "conversations"."subject", "conversations"."external_created_at", "conversations"."data_source_id", "conversations"."external_id", "conversations"."external_url", "conversations"."agent_summary", "conversations"."summary_embedding", "conversations"."closed_at", "conversations"."handling_time", "conversations"."compliance_review_id", "conversations"."interaction_type", "conversations"."search_vector", "conversations"."sla_breach_last_checked_at", "conversations"."active_evaluation_id", "conversations"."organization_data_source_id", "conversations"."customer_issue_id", "conversations"."agent_knowledge_gap_id", "conversations"."customer_sentiment_score", "conversations"."customer_sentiment_score_calculated_at", "conversations"."custom_attributes", "conversations"."qa_score_ai", "conversations"."qa_score_human", "conversations"."qa_score_effective", "conversations"."qa_score_updated_at", "conversations"."conversation_upload_id", "conversations"."follow_up_conversations_checked_at", "conversations"."priority", "conversations"."ticket_type", "conversations"."live_summary", "conversations"."resolved_at", "conversations"."language", "conversations"."review_status", "conversations"."ticket_status", "conversations"."conversation_thread_id", "conversations"."transcription_state", "conversations"."translation_state", "conversations"."evaluation_state", "conversations"."zendesk_brand_id", "conversations"."group_id", "conversations"."qa_auto_fail", "conversations"."channel_types", "conversations"."assignee_id", "conversations"."resolver_id", "conversations"."review_resolved_at", "conversations"."review_comment", "conversations"."jira_service_desk_id", "conversations"."jira_request_type_id", "conversations"."zendesk_channel", "conversations"."ticket_tags", "conversations"."churn_risk_summary", "conversations"."churn_risk_level", "conversations"."customer_sentiment_summary", "conversations"."customer_sentiment_title", "conversations"."requester_id", "conversations"."company_id", "conversations"."source_channel", "conversations"."resolver_slack_id", "conversations"."qa_risk_level", "conversations"."complaint_risk_level", "conversations"."dispute_risk_level", "conversations"."service_issue_risk_level", "conversations"."product_issue_risk_level", "conversations"."compliance_risk_level", "conversations"."risk_level", "conversations"."risk_level_updated_at", "conversations"."first_agent_response_at", "conversations"."first_customer_response_at", "conversations"."requester_employee_id", "conversations"."sla_breaches_count", "conversations"."jira_issue_key", "conversations"."assignee_membership_id", "conversations"."duplicate_of_id", "conversations"."first_customer_message_at", "conversations"."first_agent_reply_at", "conversations"."first_responder_id", "conversations"."time_to_first_response_seconds", "conversations"."resolution_time_seconds", "conversations"."first_resolved_at" FROM "conversations" WHERE "conversations"."organization_id" = $1 AND "conversations"."external_id" = $2 AND "conversations"."id" != $3 ORDER BY "conversations"."id" ASC LIMIT $4
Details
CREATE INDEX CONCURRENTLY ON conversations (external_id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- external_id (=): 1
- organization_id (=): 317697
- id (<>): 1906179
- id (sort): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
7 min
< 0.1%
|
0 ms
|
1,839,369
flightcontrol
|
INSERT INTO "conversation_part_attribute_updated_by_admins" ("public_id", "organization_id", "conversation_part_id", "data", "created_at", "updated_at", "field_name", "value", "previous_value") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id"
|
|
7 min
< 0.1%
|
13 ms
|
31,348
flightcontrol
|
UPDATE "conversations" SET "updated_at" = $1, "ticket_tags" = $2 WHERE "conversations"."id" = $3
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
6 min
< 0.1%
|
0 ms
|
3,733,010
flightcontrol
|
SELECT "pg_search_documents".* FROM "pg_search_documents" WHERE "pg_search_documents"."searchable_id" = $1 AND "pg_search_documents"."searchable_type" = $2 LIMIT $3
|
|
6 min
< 0.1%
|
6 ms
|
65,098
flightcontrol
|
UPDATE "conversations" SET "updated_at" = $1, "resolved_at" = $2 WHERE "conversations"."id" = $3
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
6 min
< 0.1%
|
0 ms
|
924,950
flightcontrol
|
INSERT INTO "conversation_part_chat_details" ("organization_id", "conversation_part_id", "content", "public_id", "created_at", "updated_at", "sent_at", "uses_redacted_tag", "html_content") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id"
|
|
6 min
< 0.1%
|
6 ms
|
59,726
flightcontrol
|
UPDATE "conversations" SET "updated_at" = $1, "handling_time" = $2 WHERE "conversations"."id" = $3
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
5 min
< 0.1%
|
0 ms
|
1,445,584
flightcontrol
|
INSERT INTO "good_job_batches" ("created_at", "updated_at", "description", "serialized_properties", "on_finish", "on_success", "on_discard", "callback_queue_name", "callback_priority", "enqueued_at", "discarded_at", "finished_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) RETURNING "id"
|
|
5 min
< 0.1%
|
2 ms
|
154,564
flightcontrol
|
UPDATE "conversations" SET "channel_types" = $1 WHERE "conversations"."id" = $2
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
5 min
< 0.1%
|
2 ms
|
139,168
flightcontrol
|
SELECT $4 AS one FROM "conversation_cx_risk_snapshots" WHERE "conversation_cx_risk_snapshots"."processing_status" = $1 AND "conversation_cx_risk_snapshots"."conversation_id" = $2 LIMIT $3
Covered by index on (conversation_id, active WHERE active = true)
Rows: 331266
Row progression: 331266, 5
Row estimates
- conversation_id (=): 5
- processing_status (=): 82817
Existing indexes
- id PRIMARY
- agent_knowledge_gap_id
- conversation_id
- conversation_id, active WHERE active = true UNIQUE
- customer_complaint_id
- customer_issue_id
- customer_issue_summary_embedding halfvec_cosine_ops HNSW
- organization_id
- organization_id, id
- processing_status
|
|
5 min
< 0.1%
|
0 ms
|
1,145,480
flightcontrol
|
UPDATE "good_jobs" SET "performed_at" = $1, "serialized_params" = $2, "scheduled_at" = $3, "created_at" = $4, "updated_at" = $5 WHERE "good_jobs"."id" = $6
Covered by index on (id)
Rows: 450254
Row progression: 450254, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_job_id, created_at
- batch_callback_id WHERE batch_callback_id IS NOT NULL
- batch_id WHERE batch_id IS NOT NULL
- concurrency_key, created_at
- concurrency_key WHERE finished_at IS NULL
- cron_key, created_at WHERE cron_key IS NOT NULL
- cron_key, cron_at WHERE cron_key IS NOT NULL UNIQUE
- finished_at WHERE finished_at IS NOT NULL
- job_class
- labels WHERE labels IS NOT NULL GIN
- locked_by_id WHERE locked_by_id IS NOT NULL
- priority, created_at WHERE finished_at IS NULL
- priority, scheduled_at WHERE (finished_at IS NULL) AND (locked_by_id IS NULL)
- priority DESC NULLS LAST, created_at WHERE finished_at IS NULL
- queue_name, scheduled_at WHERE finished_at IS NULL
- scheduled_at WHERE finished_at IS NULL
|
|
5 min
< 0.1%
|
0 ms
|
1,034,484
flightcontrol
|
INSERT INTO "company_field_values" ("value", "company_field_id", "company_id", "organization_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"
|
|
5 min
< 0.1%
|
7 ms
|
40,202
flightcontrol
|
UPDATE "conversations" SET "updated_at" = $1, "language" = $2 WHERE "conversations"."id" = $3
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
4 min
< 0.1%
|
0 ms
|
4,558,528
flightcontrol
|
SELECT "conversation_fields".* FROM "conversation_fields" WHERE "conversation_fields"."organization_id" = $1 AND "conversation_fields"."organization_data_source_id" = $2 AND "conversation_fields"."name" = $3 LIMIT $4
Details
CREATE INDEX CONCURRENTLY ON conversation_fields (name)
Rows: 530
Row progression: 530, 1
Row estimates
- name (=): 1
- organization_data_source_id (=): 76
- organization_id (=): 88
Existing indexes
- id PRIMARY
- organization_data_source_id
- organization_data_source_id, external_id UNIQUE
- organization_id
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
4 min
< 0.1%
|
0 ms
|
740,703
flightcontrol
|
SELECT "good_job_processes".* FROM "good_job_processes" LEFT JOIN pg_locks ON pg_locks.locktype = $3 AND pg_locks.objsubid = $4 AND pg_locks.classid = ($5 || substr(md5($6 || $7 || "good_job_processes"."id"::text), $8, $9))::bit(32)::int AND pg_locks.objid = (($10 || substr(md5($11 || $12 || "good_job_processes"."id"::text), $13, $14))::bit(64) << $15)::bit(32)::int WHERE ("good_job_processes"."lock_type" = $1 AND "pg_locks"."locktype" IS NULL OR "good_job_processes"."lock_type" IS NULL AND "good_job_processes"."updated_at" < $16) ORDER BY "good_job_processes"."id" ASC LIMIT $2
|
|
4 min
< 0.1%
|
4 ms
|
63,089
flightcontrol
|
UPDATE "conversations" SET "updated_at" = $1, "priority" = $2 WHERE "conversations"."id" = $3
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
4 min
< 0.1%
|
5 ms
|
44,993
flightcontrol
|
UPDATE "conversation_cx_risk_snapshots" SET "active" = $1 WHERE "conversation_cx_risk_snapshots"."organization_id" = $2 AND "conversation_cx_risk_snapshots"."conversation_id" = $3 AND "conversation_cx_risk_snapshots"."id" != $4
Covered by index on (conversation_id, active WHERE active = true)
Rows: 331266
Row progression: 331266, 5
Row estimates
- conversation_id (=): 5
- organization_id (=): 55211
- id (<>): 331265
Existing indexes
- id PRIMARY
- agent_knowledge_gap_id
- conversation_id
- conversation_id, active WHERE active = true UNIQUE
- customer_complaint_id
- customer_issue_id
- customer_issue_summary_embedding halfvec_cosine_ops HNSW
- organization_id
- organization_id, id
- processing_status
|
|
4 min
< 0.1%
|
0 ms
|
7,042,489
flightcontrol
|
SELECT "good_job_batches".* FROM "good_job_batches" WHERE "good_job_batches"."id" = $1 LIMIT $2
Covered by index on (id)
Rows: 219600
Row progression: 219600, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
|
|
4 min
< 0.1%
|
0 ms
|
5,109,617
flightcontrol
|
SELECT "jira_issue_request_field_values".* FROM "jira_issue_request_field_values" WHERE "jira_issue_request_field_values"."organization_id" = $1 AND "jira_issue_request_field_values"."jira_issue_id" = $2 AND "jira_issue_request_field_values"."jira_request_type_field_id" = $3 LIMIT $4
Covered by index on (jira_issue_id)
Rows: 108457
Row progression: 108457, 8
Row estimates
- jira_issue_id (=): 8
- jira_request_type_field_id (=): 145
- organization_id (=): 27114
Existing indexes
- id PRIMARY
- jira_issue_id
- jira_issue_id, jira_request_type_field_id UNIQUE
- jira_request_type_field_id
- organization_id
|
|
4 min
< 0.1%
|
10 ms
|
22,971
flightcontrol
|
UPDATE "conversations" SET "first_customer_message_at" = $1, "first_agent_reply_at" = $2, "first_responder_id" = $3, "time_to_first_response_seconds" = $4 WHERE "conversations"."id" = $5
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
4 min
< 0.1%
|
0 ms
|
3,712,755
flightcontrol
|
SELECT "sessions".* FROM "sessions" WHERE "sessions"."session_id" = $1 ORDER BY "sessions"."id" ASC LIMIT $2
Covered by index on (session_id)
Rows: 3074505
Row progression: 3074505, 1
Row estimates
- session_id (=): 1
- id (sort): 1
Existing indexes
- id PRIMARY
- session_id UNIQUE
- updated_at
|
|
4 min
< 0.1%
|
0 ms
|
5,798,762
flightcontrol
|
SELECT $6 AS one FROM "conversations" WHERE "conversations"."external_id" = $1 AND "conversations"."id" != $2 AND "conversations"."data_source_id" = $3 AND "conversations"."organization_id" = $4 LIMIT $5
Details
CREATE INDEX CONCURRENTLY ON conversations (external_id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- external_id (=): 1
- data_source_id (=): 317273
- organization_id (=): 317697
- id (<>): 1906179
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
4 min
< 0.1%
|
1 ms
|
316,669
flightcontrol
|
INSERT INTO "conversation_agents" ("organization_id", "conversation_id", "employee_id", "public_id", "created_at", "updated_at", "eligible_for_qa_evaluation") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"
|
|
3 min
< 0.1%
|
0 ms
|
5,814,168
flightcontrol
|
SELECT "customer_field_values".* FROM "customer_field_values" WHERE "customer_field_values"."organization_id" = $1 AND "customer_field_values"."client_id" = $2 AND "customer_field_values"."customer_field_id" = $3 LIMIT $4
Covered by index on (client_id)
Rows: 529453
Row progression: 529453, 7
Row estimates
- client_id (=): 7
- customer_field_id (=): 15572
- organization_id (=): 264727
Existing indexes
- id PRIMARY
- client_id
- client_id, customer_field_id UNIQUE
- customer_field_id
- organization_id
|
|
3 min
< 0.1%
|
10 ms
|
21,198
flightcontrol
|
UPDATE "conversations" SET "conversation_thread_id" = $1 WHERE "conversations"."organization_id" = $2 AND "conversations"."conversation_thread_id" = $3
Covered by index on (conversation_thread_id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- conversation_thread_id (=): 1
- organization_id (=): 317697
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
3 min
< 0.1%
|
2 ms
|
107,272
flightcontrol
|
UPDATE "conversations" SET "updated_at" = $1, "group_id" = $2 WHERE "conversations"."id" = $3
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
3 min
< 0.1%
|
0 ms
|
11,877,907
flightcontrol
|
SELECT pg_advisory_unlock(($2||substr(md5($1::text), $3, $4))::bit(64)::bigint) AS unlocked
|
|
3 min
< 0.1%
|
0 ms
|
8,345,904
flightcontrol
|
SELECT "data_sources".* FROM "data_sources" WHERE "data_sources"."key" = $1 LIMIT $2
|
|
3 min
< 0.1%
|
0 ms
|
1,678,515
flightcontrol
|
SELECT "clients".* FROM "clients" WHERE "clients"."organization_id" = $1 AND "clients"."data_source_id" = $2 AND "clients"."data_source_uid" = $3 LIMIT $4
Details
CREATE INDEX CONCURRENTLY ON clients (data_source_uid)
Rows: 743769
Row progression: 743769, 1
Row estimates
- data_source_uid (=): 1
- data_source_id (=): 142526
- organization_id (=): 148754
Existing indexes
- id PRIMARY
- data_source_id
- organization_data_source_id
- organization_id
- organization_id, data_source_id, data_source_uid WHERE (data_source_id IS NOT NULL) AND (data_source_uid IS NOT NULL) UNIQUE
- organization_id, user_id WHERE user_id IS NOT NULL UNIQUE
- public_id UNIQUE
|
|
3 min
< 0.1%
|
2 ms
|
105,229
flightcontrol
|
UPDATE "conversations" SET "first_agent_response_at" = $1 WHERE "conversations"."id" = $2
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
3 min
< 0.1%
|
0 ms
|
542,575
flightcontrol
|
SELECT "conversation_field_values".* FROM "conversation_field_values" WHERE "conversation_field_values"."organization_id" = $1 AND "conversation_field_values"."conversation_id" = $2
Covered by index on (conversation_id)
Rows: 2367749
Row progression: 2367749, 27
Row estimates
- conversation_id (=): 27
- organization_id (=): 789250
Existing indexes
- id PRIMARY
- conversation_field_id
- conversation_id
- conversation_id, conversation_field_id UNIQUE
- organization_id
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
3 min
< 0.1%
|
0 ms
|
660,853
flightcontrol
|
UPDATE "conversation_threads" SET "initial_contact_at" = $1, "last_contact_at" = $2, "contacts_count" = $3 WHERE "conversation_threads"."id" = $4
Covered by index on (id)
Rows: 324174
Row progression: 324174, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- organization_id
- public_id WHERE public_id IS NOT NULL UNIQUE
- root_conversation_id UNIQUE
|
|
3 min
< 0.1%
|
0 ms
|
509,357
flightcontrol
|
UPDATE "conversation_parts" SET "updated_at" = $1, "body_english" = $2 WHERE "conversation_parts"."id" = $3
Covered by index on (id)
Rows: 26367628
Row progression: 26367628, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- author_client_id
- author_employee_id
- author_employee_id, author_type
- conversation_id
- conversation_id, author_type
- data_source_id
- external_created_at
- organization_data_source_id
- organization_data_source_id, external_id WHERE (organization_data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id
- organization_id, data_source_id, conversation_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- public_id UNIQUE
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- type
|
|
3 min
< 0.1%
|
0 ms
|
974,506
flightcontrol
|
SELECT COUNT(*) FROM "evaluation_usages" WHERE "evaluation_usages"."organization_id" = $1 AND "evaluation_usages"."evaluation_credit_id" = $2
Covered by index on (evaluation_credit_id)
Rows: 8360
Row progression: 8360, 2090, 697
Row estimates
- evaluation_credit_id (=): 2090
- organization_id (=): 2787
Existing indexes
- id PRIMARY
- conversation_id UNIQUE
- evaluation_credit_id
- organization_id
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
3 min
< 0.1%
|
0 ms
|
340,158
flightcontrol
|
INSERT INTO "conversation_part_notes" ("public_id", "organization_id", "conversation_part_id", "body", "created_at", "updated_at", "html_body") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"
|
|
3 min
< 0.1%
|
0 ms
|
5,109,761
flightcontrol
|
SELECT "jira_request_type_fields".* FROM "jira_request_type_fields" WHERE "jira_request_type_fields"."jira_request_type_id" = $1 AND "jira_request_type_fields"."external_id" = $2 LIMIT $3
Covered by index on (external_id)
Rows: 1007
Row progression: 1007, 4
Row estimates
- external_id (=): 4
- jira_request_type_id (=): 7
Existing indexes
- id PRIMARY
- external_id
- jira_request_type_id
- jira_request_type_id, external_id UNIQUE
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
3 min
< 0.1%
|
0 ms
|
2,990,648
flightcontrol
|
SELECT "conversation_agents".* FROM "conversation_agents" WHERE "conversation_agents"."organization_id" = $1 AND "conversation_agents"."conversation_id" = $2 AND "conversation_agents"."employee_id" = $3 LIMIT $4
Covered by index on (conversation_id, employee_id)
Rows: 987573
Row progression: 987573, 5
Row estimates
- conversation_id (=): 5
- employee_id (=): 694
- organization_id (=): 246893
Existing indexes
- id PRIMARY
- conversation_id
- conversation_id, employee_id UNIQUE
- eligible_for_qa_evaluation
- employee_id
- organization_id
- organization_id, conversation_id, employee_id UNIQUE
- organization_id, employee_id, conversation_id
- public_id WHERE public_id IS NOT NULL UNIQUE
|
|
2 min
< 0.1%
|
0 ms
|
84,851,195
flightcontrol
|
BEGIN
|
|
2 min
< 0.1%
|
0 ms
|
5,814,146
flightcontrol
|
SELECT "customer_fields".* FROM "customer_fields" WHERE "customer_fields"."organization_id" = $1 AND "customer_fields"."name" = $2 AND "customer_fields"."organization_data_source_id" = $3 LIMIT $4
|
|
2 min
< 0.1%
|
22 ms
|
6,855
flightcontrol
|
UPDATE "conversations" SET "first_agent_reply_at" = $1, "first_responder_id" = $2, "time_to_first_response_seconds" = $3 WHERE "conversations"."id" = $4
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
2 min
< 0.1%
|
1 ms
|
111,260
flightcontrol
|
SELECT t.oid, t.typname, t.typelem, t.typdelim, t.typinput, r.rngsubtype, t.typtype, t.typbasetype
FROM pg_type as t
LEFT JOIN pg_range as r ON oid = rngtypid
WHERE
t.typname IN ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44)
|
|
2 min
< 0.1%
|
0 ms
|
626,871
flightcontrol
|
SELECT "conversation_part_email_details".* FROM "conversation_part_email_details" WHERE "conversation_part_email_details"."organization_id" = $1 AND "conversation_part_email_details"."conversation_part_id" = $2 LIMIT $3
Covered by index on (conversation_part_id)
Rows: 828537
Row progression: 828537, 1
Row estimates
- conversation_part_id (=): 1
- organization_id (=): 165707
Existing indexes
- id PRIMARY
- conversation_part_id
- organization_id
- public_id UNIQUE
|
|
2 min
< 0.1%
|
14 ms
|
10,098
flightcontrol
|
UPDATE "conversations" SET "updated_at" = $1, "handling_time" = $2, "ticket_tags" = $3 WHERE "conversations"."id" = $4
Covered by index on (id)
Rows: 1906180
Row progression: 1906180, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|
|
2 min
< 0.1%
|
1 ms
|
268,427
flightcontrol
|
INSERT INTO "conversation_thread_items" ("conversation_thread_id", "conversation_id", "jira_issue_id", "type", "conversation_origin", "jira_issue_origin", "entity_created_at", "public_id", "organization_id", "created_at", "updated_at", "slack_message_id", "slack_message_origin", "slack_message_notification_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) RETURNING "id"
|
|
2 min
< 0.1%
|
105 ms
|
1,308
flightcontrol
|
SELECT AVG("conversations"."qa_score_effective") FROM "conversations" WHERE "conversations"."organization_id" = $1 AND "conversations"."started_at" BETWEEN $2 AND $3
Covered by index on (started_at)
Rows: 1906180
Row progression: 1906180, 190345
Row estimates
- started_at (BETWEEN): 190345
- organization_id (=): 317697
Existing indexes
- id PRIMARY
- active_evaluation_id
- agent_knowledge_gap_id
- assignee_id
- assignee_membership_id
- channel_types GIN
- client_id
- closed_at
- company_id
- compliance_review_id
- conversation_thread_id
- conversation_upload_id WHERE conversation_upload_id IS NOT NULL UNIQUE
- customer_account_id
- customer_issue_id
- customer_issue_id, started_at, id
- data_source_id
- duplicate_of_id
- employee_id
- evaluation_state
- first_agent_reply_at
- first_agent_response_at
- first_customer_message_at
- first_customer_response_at
- first_responder_id
- group_id
- interaction_type
- jira_issue_key WHERE jira_issue_key IS NOT NULL
- jira_request_type_id
- jira_service_desk_id
- organization_data_source_id
- organization_id
- organization_id, closed_at WHERE handling_time IS NOT NULL
- organization_id, closed_at) INCLUDE (id, handling_time WHERE handling_time IS NOT NULL
- organization_id, data_source_id, external_id WHERE (data_source_id IS NOT NULL) AND (external_id IS NOT NULL) UNIQUE
- organization_id, interaction_type, complaint_risk_level
- organization_id, interaction_type, complaint_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, compliance_risk_level
- organization_id, interaction_type, compliance_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, dispute_risk_level
- organization_id, interaction_type, dispute_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, product_issue_risk_level
- organization_id, interaction_type, product_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, qa_risk_level
- organization_id, interaction_type, risk_level
- organization_id, interaction_type, risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, service_issue_risk_level
- organization_id, interaction_type, service_issue_risk_level, external_created_at DESC, created_at DESC
- organization_id, interaction_type, started_at
- organization_id, interaction_type, started_at, active_evaluation_id
- organization_id, interaction_type, ticket_status, qa_risk_level, external_created_at DESC, created_at DESC
- organization_id, started_at
- organization_id, started_at) INCLUDE (qa_score_effective
- public_id UNIQUE
- qa_auto_fail
- qa_score_updated_at
- reference_id WHERE reference_id IS NOT NULL UNIQUE
- requester_employee_id
- requester_id
- resolved_at
- resolver_id
- search_vector GIN
- sla_breach_last_checked_at
- started_at
- ticket_status
- transcription_state
- translation_state
- zendesk_brand_id
|