|
6,170 min
36%
|
69 ms
|
5,339,459
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."priority" AS "priority", "_root.base"."created_at" AS "createdAt", "_root.base"."updated_at" AS "updatedAt", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."done_at" AS "doneAt", "_root.base"."cancel_at" AS "cancelAt", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", "_root.base"."linkedin_seat_id" AS "linkedinSeatId", "_root.base"."type" AS "type", "_root.base"."status" AS "status", "_root.base"."since" AS "since", "_root.base"."retries" AS "retries", "_root.base"."parameters" AS "parameters", "_root.base"."profile_id" AS "profileId", "_root.base"."version" AS "version", "_root.base"."duration" AS "duration", "_root.or.profile"."profile" AS "profile", "_root.base"."trigger_id" AS "triggerId", "_root.or.trigger"."trigger" AS "trigger", "_root.base"."dashboard_id" AS "dashboardId", "_root.base"."project_id" AS "projectId", "_root.or.project"."project" AS "project", "_root.base"."recording_id" AS "recordingId", "_root.base"."historyentry_id" AS "historyEntryId", "_root.or.historyEntry"."historyEntry" AS "historyEntry", "_root.or.user"."user" AS "user", "_root.base"."file_id" AS "fileId", "_root.base"."email_address" AS "emailAddress", "_root.base"."phone_number_provider_id" AS "phoneNumberProviderId", "_root.base"."message_scheduled_id" AS "messageScheduledId", "_root.base"."external_id" AS "externalId", "_root.base"."return" AS "return", "_root.base"."return_status_code" AS "returnStatusCode", "_root.base"."oauth_account_id" AS "oAuthAccountId", "_root.or.typeComment"."typeComment" AS "typeComment", "_root.base"."retry_at" AS "retryAt", "_root.base"."resume_when" AS "resumeWhen", $5 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."get_task_and_set_as_doing"($1, ($2)::text, "max_tasks" => ($3)::integer) AS "_get_task_and_set_as_doing" WHERE ($6) ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.trigger.base"."name" AS "name", "_root.or.trigger.base"."user_id" AS "userId", "_root.or.trigger.base"."updated_at" AS "updatedAt", "_root.or.trigger.base"."id" AS "id", "_root.or.trigger.base"."group_id" AS "groupId", "_root.or.trigger.base"."targeted_entity" AS "targetedEntity", "_root.or.trigger.base"."event_types" AS "eventTypes", "_root.or.trigger.base"."event_table_name" AS "eventTableName", "_root.or.trigger.base"."event_projects_ids" AS "eventProjectsIds", "_root.or.trigger.base"."event_statuses_ids" AS "eventStatusesIds", "_root.or.trigger.base"."deleted_at" AS "deletedAt", "_root.or.trigger.base"."disabled_at" AS "disabledAt", "_root.or.trigger.base"."created_at" AS "createdAt", "_root.or.trigger.base"."conditions" AS "conditions", "_root.or.trigger.base"."cancel_if_status_changes_to_archived" AS "cancelIfStatusChangesToArchived", "_root.or.trigger.base"."cancel_if_status_changes" AS "cancelIfStatusChanges", "_root.or.trigger.base"."cancel_if_new_message_received" AS "cancelIfNewMessageReceived", "_root.or.trigger.base"."cancel_if_new_event_scheduled" AS "cancelIfNewEventScheduled", "_root.or.trigger.base"."action_task_parameters" AS "actionTaskParameters", "_root.or.trigger.base"."restricted_to_users_ids" AS "restrictedToUsersIds", "_root.or.trigger.base"."ai_legal_validated_at" AS "aiLegalValidatedAt", "_root.or.trigger.base"."ai_legal_validated_by" AS "aiLegalValidatedBy", $7 AS "__typename" ) AS "_e" ) ) AS "trigger" FROM (SELECT * FROM "public"."triggers" WHERE (("_root.base"."trigger_id") = ("id")) LIMIT $8 ) AS "_root.or.trigger.base" ) AS "_root.or.trigger" ON ($9) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.typeComment.base"."comment" AS "comment", $10 AS "__typename" ) AS "_e" ) ) AS "typeComment" FROM (SELECT * FROM "public"."tasks_types" WHERE (("_root.base"."type") = ("value")) LIMIT $11 ) AS "_root.or.typeComment.base" ) AS "_root.or.typeComment" ON ($12) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.project.base"."id" AS "id", "_root.or.project.base"."name" AS "name", "_root.or.project.base"."reference_id" AS "referenceId", "_root.or.project.base"."linkedin_id" AS "linkedinId", "_root.or.project.base"."linkedin_id_type" AS "linkedinIdType", "_root.or.project.base"."is_made_for_sales" AS "isMadeForSales", "_root.or.project.base"."is_made_for_recruitment" AS "isMadeForRecruitment", "_root.or.project.or.status"."status" AS "status", "_root.or.project.or.company"."company" AS "company", $13 AS "__typename" ) AS "_e" ) ) AS "project" FROM (SELECT * FROM "public"."projects" WHERE (("_root.base"."project_id") = ("id")) LIMIT $14 ) AS "_root.or.project.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.project.or.company.base"."id" AS "id", "_root.or.project.or.company.base"."description" AS "description", "_root.or.project.or.company.or.linkedinCompanyData"."linkedinCompanyData" AS "linkedinCompanyData", $15 AS "__typename" ) AS "_e" ) ) AS "company" FROM (SELECT * FROM "public"."companies" WHERE (("_root.or.project.base"."company_id") = ("id")) LIMIT $16 ) AS "_root.or.project.or.company.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.project.or.company.or.linkedinCompanyData.base"."id" AS "id", "_root.or.project.or.company.or.linkedinCompanyData.base"."name" AS "name", $17 AS "__typename" ) AS "_e" ) ) AS "linkedinCompanyData" FROM (SELECT * FROM "public"."linkedin_companies_data" WHERE (("_root.or.project.or.company.base"."linkedin_company_id") = ("id")) LIMIT $18 ) AS "_root.or.project.or.company.or.linkedinCompanyData.base" ) AS "_root.or.project.or.company.or.linkedinCompanyData" ON ($19) ) AS "_root.or.project.or.company" ON ($20) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.project.or.status.base"."title" AS "title", "_root.or.project.or.status.base"."id" AS "id", $21 AS "__typename" ) AS "_e" ) ) AS "status" FROM (SELECT * FROM "public"."statuses" WHERE (("_root.or.project.base"."status_id") = ("id")) LIMIT $22 ) AS "_root.or.project.or.status.base" ) AS "_root.or.project.or.status" ON ($23) ) AS "_root.or.project" ON ($24) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.profile.base"."id" AS "id", "_root.or.profile.base"."trigger_first_name" AS "firstName", "_root.or.profile.base"."trigger_last_name" AS "lastName", "_root.or.profile.base"."talent_identifier" AS "talentIdentifier", "_root.or.profile.base"."linkedin_sales_navigator_identifier" AS "linkedinSalesNavigatorIdentifier", "_root.or.profile.base"."linkedin_id" AS "linkedinId", "_root.or.profile.base"."trigger_linkedin_significant_identifier" AS "linkedinSignificantIdentifier", "_root.or.profile.base"."member_id" AS "memberId", "_root.or.profile.base"."public_identifier" AS "publicIdentifier", "_root.or.profile.base"."external_id" AS "externalId", "_root.or.profile.base"."is_contact" AS "isContact", "_root.or.profile.base"."is_talent" AS "isTalent", "_root.or.profile.base"."deleted_at" AS "deletedAt", $25 AS "__typename" ) AS "_e" ) ) AS "profile" FROM (SELECT * FROM "public"."profiles" WHERE (("_root.base"."profile_id") = ("id")) LIMIT $26 ) AS "_root.or.profile.base" ) AS "_root.or.profile" ON ($27) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.user.base"."id" AS "id", "_root.or.user.base"."display_name" AS "displayName", "_root.or.user.base"."email" AS "email", $28 AS "__typename" ) AS "_e" ) ) AS "user" FROM (SELECT * FROM "auth"."users" WHERE (("_root.base"."user_id") = ("id")) LIMIT $29 ) AS "_root.or.user.base" ) AS "_root.or.user" ON ($30) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.historyEntry.base"."id" AS "id", "_root.or.historyEntry.base"."created_at" AS "createdAt", "_root.or.historyEntry.base"."event_start_at" AS "eventStartAt", "_root.or.historyEntry.base"."event_end_at" AS "eventEndAt", "_root.or.historyEntry.base"."type" AS "type", "_root.or.historyEntry.or.sender"."sender" AS "sender", "_root.or.historyEntry.base"."subject" AS "subject", "_root.or.historyEntry.base"."message" AS "message", $31 AS "__typename" ) AS "_e" ) ) AS "historyEntry" FROM (SELECT * FROM "public"."historyentries" WHERE (("_root.base"."historyentry_id") = ("id")) LIMIT $32 ) AS "_root.or.historyEntry.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.historyEntry.or.sender.base"."id" AS "id", "_root.or.historyEntry.or.sender.base"."display_name" AS "displayName", $33 AS "__typename" ) AS "_e" ) ) AS "sender" FROM (SELECT * FROM "auth"."users" WHERE (("_root.or.historyEntry.base"."sender_user_id") = ("id")) LIMIT $34 ) AS "_root.or.historyEntry.or.sender.base" ) AS "_root.or.historyEntry.or.sender" ON ($35) ) AS "_root.or.historyEntry" ON ($36) ) AS "_root"
|
|
3,100 min
18%
|
6 ms
|
31,339,126
nhost_hasura
|
WITH "_mra__tasks" AS (UPDATE "public"."tasks" SET "status" = ($1)::text,"return" = ($2)::jsonb,"group_id" = ($3)::uuid,"done_at" = ($4)::timestamptz,"return_status_code" = ($5)::numeric WHERE (((("public"."tasks"."group_id") = (($6)::uuid)) OR ((("public"."tasks"."group_id") IS NULL) AND ((($7)::uuid) IS NULL))) AND ((("public"."tasks"."id") = (($8)::uuid)) AND (NOT (("public"."tasks"."status") = ANY(($9)::text[]))))) RETURNING * , ($10)::boolean AS "check__constraint"), "_aca__tasks" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "type" , "status" , "parameters" , "return" , "user_id" , "retries" , "group_id" , "done_at" , "priority" , "return_status_code" , "profile_id" , "project_id" , "email_address" , "message_scheduled_id" , "linkedin_seat_id" , "file_id" , "external_id" , "oauth_account_id" , "version" , "since" , "duration" , "user_id_or_group_id" , "historyentry_id" , "phone_number_provider_id" , "retry_at" , "trigger_id" , "trigger_worker_type" , "recording_id" , "resume_when" , "skip_extension_queue_and_execute_immediately" , "cancel_at" , "dashboard_id" FROM "_mra__tasks" ) SELECT json_build_object($11, (SELECT coalesce(json_agg("root" ), $12 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."status" AS "status", "_root.base"."type" AS "type", "_root.base"."parameters" AS "parameters", "_root.base"."profile_id" AS "profileId", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", $13 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__tasks" WHERE ($14) ) AS "_root.base" ) AS "_root" ), $15, $16 ) , (SELECT coalesce(bool_and("check__constraint" ), $17 ) FROM "_mra__tasks" )
|
|
1,018 min
6%
|
5 ms
|
12,607,401
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."priority" AS "priority", "_root.base"."created_at" AS "createdAt", "_root.base"."updated_at" AS "updatedAt", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."done_at" AS "doneAt", "_root.base"."cancel_at" AS "cancelAt", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", "_root.base"."linkedin_seat_id" AS "linkedinSeatId", "_root.base"."type" AS "type", "_root.base"."status" AS "status", "_root.base"."since" AS "since", "_root.base"."retries" AS "retries", "_root.base"."parameters" AS "parameters", "_root.base"."profile_id" AS "profileId", "_root.base"."version" AS "version", "_root.base"."duration" AS "duration", "_root.or.profile"."profile" AS "profile", "_root.base"."trigger_id" AS "triggerId", "_root.or.trigger"."trigger" AS "trigger", "_root.base"."dashboard_id" AS "dashboardId", "_root.base"."project_id" AS "projectId", "_root.or.project"."project" AS "project", "_root.base"."recording_id" AS "recordingId", "_root.base"."historyentry_id" AS "historyEntryId", "_root.or.historyEntry"."historyEntry" AS "historyEntry", "_root.or.user"."user" AS "user", "_root.base"."file_id" AS "fileId", "_root.base"."email_address" AS "emailAddress", "_root.base"."phone_number_provider_id" AS "phoneNumberProviderId", "_root.base"."message_scheduled_id" AS "messageScheduledId", "_root.base"."external_id" AS "externalId", "_root.base"."return" AS "return", "_root.base"."return_status_code" AS "returnStatusCode", "_root.base"."oauth_account_id" AS "oAuthAccountId", "_root.or.typeComment"."typeComment" AS "typeComment", "_root.base"."retry_at" AS "retryAt", "_root.base"."resume_when" AS "resumeWhen", $5 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."get_task_and_set_as_doing"($1, ($2)::text, ($3)::uuid) AS "_get_task_and_set_as_doing" WHERE ((("_get_task_and_set_as_doing"."deleted_at") IS NULL) AND ((("_get_task_and_set_as_doing"."group_id") = ((($1->>$6))::uuid)) OR ((("_get_task_and_set_as_doing"."group_id") IS NULL) AND (((($1->>$7))::uuid) IS NULL)))) LIMIT $8 ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.historyEntry.base"."id" AS "id", "_root.or.historyEntry.base"."created_at" AS "createdAt", "_root.or.historyEntry.base"."event_start_at" AS "eventStartAt", "_root.or.historyEntry.base"."event_end_at" AS "eventEndAt", "_root.or.historyEntry.base"."type" AS "type", "_root.or.historyEntry.or.sender"."sender" AS "sender", "_root.or.historyEntry.base"."subject" AS "subject", "_root.or.historyEntry.base"."message" AS "message", $9 AS "__typename" ) AS "_e" ) ) AS "historyEntry" FROM (SELECT * FROM "public"."historyentries" WHERE ((("_root.base"."historyentry_id") = ("id")) AND (((("public"."historyentries"."group_id") = ((($1->>$10))::uuid)) OR ((("public"."historyentries"."group_id") IS NULL) AND (((($1->>$11))::uuid) IS NULL))) AND (("public"."historyentries"."trigger_is_confidentiality_forced") = (($12)::boolean)))) LIMIT $13 ) AS "_root.or.historyEntry.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.historyEntry.or.sender.base"."id" AS "id", "_root.or.historyEntry.or.sender.base"."display_name" AS "displayName", $14 AS "__typename" ) AS "_e" ) ) AS "sender" FROM (SELECT * FROM "auth"."users" WHERE ((("_root.or.historyEntry.base"."sender_user_id") = ("id")) AND ((EXISTS (SELECT $15 FROM "public"."users_groups" AS "__be_0_users_groups" WHERE (((("__be_0_users_groups"."user_id") = ("auth"."users"."id")) AND ($16)) AND (($17) AND (((("__be_0_users_groups"."group_id") = ((($1->>$18))::uuid)) AND ($19)) AND ($20)))) )) OR (("auth"."users"."id") = ((($1->>$21))::uuid)))) LIMIT $22 ) AS "_root.or.historyEntry.or.sender.base" ) AS "_root.or.historyEntry.or.sender" ON ($23) ) AS "_root.or.historyEntry" ON ($24) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.project.base"."id" AS "id", "_root.or.project.base"."name" AS "name", "_root.or.project.base"."reference_id" AS "referenceId", "_root.or.project.base"."linkedin_id" AS "linkedinId", "_root.or.project.base"."linkedin_id_type" AS "linkedinIdType", "_root.or.project.base"."is_made_for_sales" AS "isMadeForSales", "_root.or.project.base"."is_made_for_recruitment" AS "isMadeForRecruitment", "_root.or.project.or.status"."status" AS "status", "_root.or.project.or.company"."company" AS "company", $25 AS "__typename" ) AS "_e" ) ) AS "project" FROM (SELECT * FROM "public"."projects" WHERE ((("_root.base"."project_id") = ("id")) AND ((("public"."projects"."group_id") = ((($1->>$26))::uuid)) OR ((("public"."projects"."group_id") IS NULL) AND (((($1->>$27))::uuid) IS NULL)))) LIMIT $28 ) AS "_root.or.project.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.project.or.company.base"."id" AS "id", "_root.or.project.or.company.base"."description" AS "description", "_root.or.project.or.company.or.linkedinCompanyData"."linkedinCompanyData" AS "linkedinCompanyData", $29 AS "__typename" ) AS "_e" ) ) AS "company" FROM (SELECT * FROM "public"."companies" WHERE ((("_root.or.project.base"."company_id") = ("id")) AND (("public"."companies"."group_id") = ((($1->>$30))::uuid))) LIMIT $31 ) AS "_root.or.project.or.company.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.project.or.company.or.linkedinCompanyData.base"."id" AS "id", "_root.or.project.or.company.or.linkedinCompanyData.base"."name" AS "name", $32 AS "__typename" ) AS "_e" ) ) AS "linkedinCompanyData" FROM (SELECT * FROM "public"."linkedin_companies_data" WHERE (("_root.or.project.or.company.base"."linkedin_company_id") = ("id")) LIMIT $33 ) AS "_root.or.project.or.company.or.linkedinCompanyData.base" ) AS "_root.or.project.or.company.or.linkedinCompanyData" ON ($34) ) AS "_root.or.project.or.company" ON ($35) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.project.or.status.base"."title" AS "title", "_root.or.project.or.status.base"."id" AS "id", $36 AS "__typename" ) AS "_e" ) ) AS "status" FROM (SELECT * FROM "public"."statuses" WHERE ((("_root.or.project.base"."status_id") = ("id")) AND (((("public"."statuses"."group_id") = ((($1->>$37))::uuid)) OR ((("public"."statuses"."group_id") IS NULL) AND (((($1->>$38))::uuid) IS NULL))) OR (("public"."statuses"."group_id") IS NULL))) LIMIT $39 ) AS "_root.or.project.or.status.base" ) AS "_root.or.project.or.status" ON ($40) ) AS "_root.or.project" ON ($41) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.typeComment.base"."comment" AS "comment", $42 AS "__typename" ) AS "_e" ) ) AS "typeComment" FROM (SELECT * FROM "public"."tasks_types" WHERE (("_root.base"."type") = ("value")) LIMIT $43 ) AS "_root.or.typeComment.base" ) AS "_root.or.typeComment" ON ($44) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.user.base"."id" AS "id", "_root.or.user.base"."display_name" AS "displayName", "_root.or.user.base"."email" AS "email", $45 AS "__typename" ) AS "_e" ) ) AS "user" FROM (SELECT * FROM "auth"."users" WHERE ((("_root.base"."user_id") = ("id")) AND ((EXISTS (SELECT $46 FROM "public"."users_groups" AS "__be_0_users_groups" WHERE (((("__be_0_users_groups"."user_id") = ("auth"."users"."id")) AND ($47)) AND (($48) AND (((("__be_0_users_groups"."group_id") = ((($1->>$49))::uuid)) AND ($50)) AND ($51)))) )) OR (("auth"."users"."id") = ((($1->>$52))::uuid)))) LIMIT $53 ) AS "_root.or.user.base" ) AS "_root.or.user" ON ($54) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.profile.base"."id" AS "id", "_root.or.profile.base"."trigger_first_name" AS "firstName", "_root.or.profile.base"."trigger_last_name" AS "lastName", "_root.or.profile.base"."talent_identifier" AS "talentIdentifier", "_root.or.profile.base"."linkedin_sales_navigator_identifier" AS "linkedinSalesNavigatorIdentifier", "_root.or.profile.base"."linkedin_id" AS "linkedinId", "_root.or.profile.base"."trigger_linkedin_significant_identifier" AS "linkedinSignificantIdentifier", "_root.or.profile.base"."member_id" AS "memberId", "_root.or.profile.base"."public_identifier" AS "publicIdentifier", "_root.or.profile.base"."external_id" AS "externalId", "_root.or.profile.base"."is_contact" AS "isContact", "_root.or.profile.base"."is_talent" AS "isTalent", "_root.or.profile.base"."deleted_at" AS "deletedAt", $55 AS "__typename" ) AS "_e" ) ) AS "profile" FROM (SELECT * FROM "public"."profiles" WHERE ((("_root.base"."profile_id") = ("id")) AND ((("public"."profiles"."group_id") = ((($1->>$56))::uuid)) OR ((("public"."profiles"."group_id") IS NULL) AND (((($1->>$57))::uuid) IS NULL)))) LIMIT $58 ) AS "_root.or.profile.base" ) AS "_root.or.profile" ON ($59) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.trigger.base"."name" AS "name", "_root.or.trigger.base"."user_id" AS "userId", "_root.or.trigger.base"."updated_at" AS "updatedAt", "_root.or.trigger.base"."id" AS "id", "_root.or.trigger.base"."group_id" AS "groupId", "_root.or.trigger.base"."targeted_entity" AS "targetedEntity", "_root.or.trigger.base"."event_types" AS "eventTypes", "_root.or.trigger.base"."event_table_name" AS "eventTableName", "_root.or.trigger.base"."event_projects_ids" AS "eventProjectsIds", "_root.or.trigger.base"."event_statuses_ids" AS "eventStatusesIds", "_root.or.trigger.base"."deleted_at" AS "deletedAt", "_root.or.trigger.base"."disabled_at" AS "disabledAt", "_root.or.trigger.base"."created_at" AS "createdAt", "_root.or.trigger.base"."conditions" AS "condit
|
|
1,011 min
6%
|
5 ms
|
11,841,723
nhost_hasura
|
UPDATE hdb_catalog.event_log
SET locked = NOW()
WHERE id IN ( SELECT l.id
FROM hdb_catalog.event_log l
WHERE l.delivered = $3 and l.error = $4
and (l.locked IS NULL or l.locked < (NOW() - interval $5))
and (l.next_retry_at is NULL or l.next_retry_at <= now())
and l.archived = $6
and l.trigger_name = ANY($2)
/* NB: this ordering is important for our index `event_log_fetch_events` */
/* (see `init_pg_source.sql`) */
ORDER BY locked NULLS FIRST, next_retry_at NULLS FIRST, created_at
LIMIT $1
FOR UPDATE SKIP LOCKED )
RETURNING id, schema_name, table_name, trigger_name, payload::json, tries, created_at, next_retry_at,
-- We need the UTC values of `created_at` and `next_retry_at` for metrics
-- calculation.
--
-- Only `TIMESTAMPZ` (time with timezone offset) values can be used for proper
-- conversions between timezones.
--
-- Since `created_at` and `next_retry_at` are `TIMESTAMP` values (time without
-- timezone offset), we first convert them to TIMESTAMPZ` values by appending
-- the timezone offset of the database. And then convert the `TIMESTAMPZ`
-- values to UTC.
(select (select created_at at time zone (select current_setting ($7))) at time zone $8),
(select (select next_retry_at at time zone (select current_setting ($9))) at time zone $10)
|
|
706 min
4%
|
600 ms
|
70,642
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $8 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."trigger_short_id" AS "shortId", "_root.base"."added_at" AS "addedAt", "_root.base"."birthday" AS "birthday", "_root.base"."can_send_inmail" AS "canSendInMail", "_root.base"."trigger_count_connexions_with_this_profile" AS "countConnexionsWithThisProfile", "_root.base"."trigger_count_invitations_scheduled_to_this_profile" AS "countInvitationsScheduledToThisProfile", "_root.base"."trigger_count_invitations_sent_to_this_profile" AS "countInvitationsSentToThisProfile", "_root.base"."trigger_count_applications_from_this_profile" AS "countApplicationsFromThisProfile", "_root.base"."trigger_count_messages_received_from_this_profile" AS "countMessagesReceivedFromThisProfile", "_root.base"."trigger_count_messages_scheduled_to_this_profile" AS "countMessagesScheduledToThisProfile", "_root.base"."trigger_count_messages_sent_to_this_profile" AS "countMessagesSentToThisProfile", "_root.base"."trigger_count_attached_files" AS "countAttachedFiles", "_root.base"."created_at" AS "createdAt", "_root.base"."created_by_userid" AS "createdByUserId", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."network_distance_level" AS "distance", "_root.base"."external_id" AS "externalId", "_root.base"."trigger_first_interaction_date" AS "firstInteractionDate", "_root.base"."trigger_first_name" AS "firstName", "_root.base"."first_name_parsed" AS "firstNameParsed", "_root.base"."first_name_manual" AS "firstNameManual", "_root.base"."group_id" AS "groupId", "_root.base"."trigger_count_resumes" AS "countResumes", "_root.base"."headline" AS "headline", "_root.base"."image_id" AS "imageId", "_root.base"."is_talent" AS "isTalent", "_root.base"."is_contact" AS "isContact", "_root.base"."is_hiring" AS "isHiring", "_root.base"."is_open_to_new_opportunities" AS "isOpenToNewOpportunities", "_root.base"."is_influencer" AS "isInfluencer", "_root.base"."is_premium" AS "isPremium", "_root.base"."trigger_last_interaction_date" AS "lastInteractionDate", "_root.base"."trigger_last_past_interaction_date" AS "lastPastInteractionDate", "_root.base"."trigger_last_interaction_type" AS "lastInteractionType", "_root.base"."last_resume_updated_at" AS "lastResumeUpdatedAt", "_root.base"."trigger_last_name" AS "lastName", "_root.base"."last_name_parsed" AS "lastNameParsed", "_root.base"."last_name_manual" AS "lastNameManual", "_root.base"."linkedin_id" AS "linkedinId", "_root.base"."member_id" AS "memberId", "_root.base"."profile_url" AS "profileUrl", "_root.base"."public_identifier" AS "publicIdentifier", "_root.base"."primary_locale" AS "primaryLocale", "_root.base"."search_string" AS "searchString", "_root.base"."source" AS "source", "_root.base"."status_id" AS "statusId", "_root.base"."talent_identifier" AS "talentIdentifier", "_root.base"."linkedin_sales_navigator_identifier" AS "linkedinSalesNavigatorIdentifier", "_root.base"."trigger_linkedin_significant_identifier" AS "linkedinSignificantIdentifier", "_root.base"."summary" AS "summary", "_root.base"."updated_at" AS "updatedAt", "_root.ar.root.pendingExecuteTriggerTasks"."pendingExecuteTriggerTasks" AS "pendingExecuteTriggerTasks", "_root.ar.root.unreadMessagesNotifications"."unreadMessagesNotifications" AS "unreadMessagesNotifications", "_root.ar.root.protectedCompaniesWorksIn"."protectedCompaniesWorksIn" AS "protectedCompaniesWorksIn", "_root.or.createdBy"."createdBy" AS "createdBy", "_root.or.image"."image" AS "image", "_root.ar.root.locations"."locations" AS "locations", "_root.ar.root.files"."files" AS "files", "_root.or.lastPosition"."lastPosition" AS "lastPosition", "_root.ar.root.positions"."positions" AS "positions", "_root.ar.root.manualHistoryEntries"."manualHistoryEntries" AS "manualHistoryEntries", "_root.ar.root.lastMessages"."lastMessages" AS "lastMessages", "_root.ar.root.locales"."locales" AS "locales", "_root.ar.root.educations"."educations" AS "educations", "_root.ar.root.skills"."skills" AS "skills", "_root.ar.root.fieldsValues"."fieldsValues" AS "fieldsValues", "_root.ar.root.emailAddresses"."emailAddresses" AS "emailAddresses", "_root.ar.root.phoneNumbers"."phoneNumbers" AS "phoneNumbers", "_root.ar.root.assignees"."assignees" AS "assignees", "_root.or.status"."status" AS "status", "_root.ar.root.associations"."associations" AS "associations", $9 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."profiles" WHERE (((("public"."profiles"."group_id") = ((($1->>$10))::uuid)) OR ((("public"."profiles"."group_id") IS NULL) AND (((($1->>$11))::uuid) IS NULL))) AND (("public"."profiles"."id") = ANY(($7)::uuid[]))) ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.createdBy.base"."display_name" AS "displayName", "_root.or.createdBy.base"."id" AS "id", $12 AS "__typename" ) AS "_e" ) ) AS "createdBy" FROM (SELECT * FROM "auth"."users" WHERE ((("_root.base"."created_by_userid") = ("id")) AND ((EXISTS (SELECT $13 FROM "public"."users_groups" AS "__be_0_users_groups" WHERE (((("__be_0_users_groups"."user_id") = ("auth"."users"."id")) AND ($14)) AND (($15) AND (((("__be_0_users_groups"."group_id") = ((($1->>$16))::uuid)) AND ($17)) AND ($18)))) )) OR (("auth"."users"."id") = ((($1->>$19))::uuid)))) LIMIT $20 ) AS "_root.or.createdBy.base" ) AS "_root.or.createdBy" ON ($21) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "public"."images_public_url"("_root.or.image.base") AS "publicUrl", $22 AS "__typename" ) AS "_e" ) ) AS "image" FROM (SELECT * FROM "public"."images" WHERE (("_root.base"."image_id") = ("id")) LIMIT $23 ) AS "_root.or.image.base" ) AS "_root.or.image" ON ($24) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.status.base"."title" AS "title", "_root.or.status.base"."color_id" AS "colorId", "_root.or.status.base"."is_auto" AS "isAuto", "_root.or.status.base"."id" AS "id", "_root.or.status.base"."is_protected" AS "isProtected", $25 AS "__typename" ) AS "_e" ) ) AS "status" FROM (SELECT * FROM "public"."statuses" WHERE ((("_root.base"."status_id") = ("id")) AND (((("public"."statuses"."group_id") = ((($1->>$26))::uuid)) OR ((("public"."statuses"."group_id") IS NULL) AND (((($1->>$27))::uuid) IS NULL))) OR (("public"."statuses"."group_id") IS NULL))) LIMIT $28 ) AS "_root.or.status.base" ) AS "_root.or.status" ON ($29) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.lastPosition.base"."id" AS "id", "_root.or.lastPosition.base"."start_date" AS "startDate", "_root.or.lastPosition.base"."end_date" AS "endDate", "_root.or.lastPosition.base"."title" AS "title", "_root.or.lastPosition.base"."source" AS "source", "_root.or.lastPosition.base"."company_name" AS "companyName", "_root.or.lastPosition.base"."linkedin_company_id" AS "linkedinCompanyId", "_root.or.lastPosition.or.linkedinCompanyData"."linkedinCompanyData" AS "linkedinCompanyData", $30 AS "__typename" ) AS "_e" ) ) AS "lastPosition" FROM (SELECT * FROM "public"."profiles_positions_last_view" WHERE ((("_root.base"."id") = ("profile_id")) AND ((("public"."profiles_positions_last_view"."group_id") = ((($1->>$31))::uuid)) OR ((("public"."profiles_positions_last_view"."group_id") IS NULL) AND (((($1->>$32))::uuid) IS NULL)))) LIMIT $33 ) AS "_root.or.lastPosition.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.lastPosition.or.linkedinCompanyData.base"."id" AS "id", "_root.or.lastPosition.or.linkedinCompanyData.base"."name" AS "name", "_root.or.lastPosition.or.linkedinCompanyData.or.image"."image" AS "image", $34 AS "__typename" ) AS "_e" ) ) AS "linkedinCompanyData" FROM (SELECT * FROM "public"."linkedin_companies_data" WHERE (("_root.or.lastPosition.base"."linkedin_company_id") = ("id")) LIMIT $35 ) AS "_root.or.lastPosition.or.linkedinCompanyData.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "public"."images_public_url"("_root.or.lastPosition.or.linkedinCompanyData.or.image.base") AS "publicUrl", $36 AS "__typename" ) AS "_e" ) ) AS "image" FROM (SELECT * FROM "public"."images" WHERE (("_root.or.lastPosition.or.linkedinCompanyData.base"."image_id") = ("id")) LIMIT $37 ) AS "_root.or.lastPosition.or.linkedinCompanyData.or.image.base" ) AS "_root.or.lastPosition.or.linkedinCompanyData.or.image" ON ($38) ) AS "_root.or.lastPosition.or.linkedinCompanyData" ON ($39) ) AS "_root.or.lastPosition" ON ($40) LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("files" ORDER BY "root.ar.root.files.pg.created_at" DESC NULLS FIRST), $41 ) AS "files" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.files.base"."file_id" AS "fileId", "_root.ar.root.files.base"."created_at" AS "createdAt", "_root.ar.root.files.base"."updated_at" AS "updatedAt", "_root.ar.root.files.base"."should_be_parsed" AS "shouldBeParsed", "_root.ar.root.files.base"."parsed_at" AS "parsedAt", "_root.ar.root.files.base"."text_content" AS "textContent", "_root.ar.root.files.or.file"."file" AS "file", $42 AS "__typename" ) AS "_e" ) ) AS "files", "_root.ar.root.files.base"."created_at" AS "root.ar.root.files.pg.created_at" FROM (SELECT * FROM "public"."profiles_files" WHERE ((("_root.base"."id") = ("profile_id")) AND ((EXISTS (SELECT $43 FROM "public"."profiles" AS "__be_0_profiles" WHERE (((("__be_0_profiles"."id") = ("public"."profiles_files"."profile_id")) AND ($44)) AND (($45) AND ((((("__be_0_profiles"."group_id") = ((($1->>$46))::uuid)) OR ((("__be_0_profiles"."group_id") IS NULL) AND (((($1->>$47))::uuid) IS NULL))) AND ($48)) AND ($49)))) )) AND (("public"."profiles_files"."deleted_at") IS NULL))) ORDER BY "created_at" DESC NULLS FIRST ) AS "_root.ar.root.files.base" LEFT OUTER
|
|
574 min
3%
|
1 ms
|
23,638,142
nhost_hasura
|
WITH "_mra__tasks" AS (UPDATE "public"."tasks" SET "duration" = ($1)::"interval","group_id" = ($2)::uuid WHERE (((("public"."tasks"."group_id") = (($3)::uuid)) OR ((("public"."tasks"."group_id") IS NULL) AND ((($4)::uuid) IS NULL))) AND (("public"."tasks"."id") = (($5)::uuid))) RETURNING * , ($6)::boolean AS "check__constraint"), "_aca__tasks" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "type" , "status" , "parameters" , "return" , "user_id" , "retries" , "group_id" , "done_at" , "priority" , "return_status_code" , "profile_id" , "project_id" , "email_address" , "message_scheduled_id" , "linkedin_seat_id" , "file_id" , "external_id" , "oauth_account_id" , "version" , "since" , "duration" , "user_id_or_group_id" , "historyentry_id" , "phone_number_provider_id" , "retry_at" , "trigger_id" , "trigger_worker_type" , "recording_id" , "resume_when" , "skip_extension_queue_and_execute_immediately" , "cancel_at" , "dashboard_id" FROM "_mra__tasks" ) SELECT json_build_object($7, (SELECT coalesce(json_agg("root" ), $8 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."status" AS "status", "_root.base"."type" AS "type", "_root.base"."parameters" AS "parameters", "_root.base"."profile_id" AS "profileId", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", $9 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__tasks" WHERE ($10) ) AS "_root.base" ) AS "_root" ), $11, $12 ) , (SELECT coalesce(bool_and("check__constraint" ), $13 ) FROM "_mra__tasks" )
|
|
515 min
3%
|
6 ms
|
4,775,387
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."user_id" AS "id", "_root.base"."user_id" AS "userId", "_root.base"."pwa_is_opened_at" AS "pwaIsOpenedAt", "public"."users_states_pwa_is_opened"("_root.base") AS "pwaIsOpened", "_root.base"."extension_version" AS "extensionVersion", "_root.base"."linkedin_invitations_sent_quota_reached_at" AS "linkedinInvitationsSentQuotaReachedAt", "public"."users_states_linkedin_invitations_sent_quota_reached"("_root.base") AS "linkedinInvitationsSentQuotaReached", "_root.base"."extension_is_connected_to_linkedin_sales_navigator_at" AS "extensionIsConnectedToLinkedinSalesNavigatorAt", "public"."users_states_extension_is_connected_to_linkedin_sales_navigator"("_root.base") AS "extensionIsConnectedToLinkedinSalesNavigator", "_root.base"."extension_is_connected_to_linkedin_recruiter_at" AS "extensionIsConnectedToLinkedinRecruiterAt", "public"."users_states_extension_is_connected_to_linkedin_recruiter"("_root.base") AS "extensionIsConnectedToLinkedinRecruiter", "_root.base"."extension_is_connected_at" AS "extensionIsConnectedAt", "_root.base"."current_linkedin_recruiter_seat_id" AS "currentLinkedinRecruiterSeatId", "_root.base"."current_linkedin_sales_navigator_seat_id" AS "currentLinkedinSalesNavigatorSeatId", "public"."users_states_extension_is_connected"("_root.base") AS "extensionIsConnected", "public"."users_states_has_a_linkedin_premium_inmail_licence"("_root.base") AS "hasALinkedinPremiumInmailLicence", "public"."users_states_has_a_linkedin_recruiter_account"("_root.base") AS "hasALinkedinRecruiterAccount", "public"."users_states_has_a_linkedin_sales_navigator_account"("_root.base") AS "hasALinkedinSalesNavigatorAccount", "public"."users_states_has_a_connected_email_provider"("_root.base") AS "hasAConnectedEmailProvider", "public"."users_states_has_a_connected_whatsapp_provider"("_root.base") AS "hasAConnectedWhatsappProvider", "public"."users_states_has_a_connected_telegram_provider"("_root.base") AS "hasAConnectedTelegramProvider", "public"."users_states_has_a_connected_sms_provider"("_root.base") AS "hasAConnectedSmsProvider", "public"."users_states_jarvi_quotas_exceeded"("_root.base") AS "jarviQuotasReached", "public"."users_states_jarvi_quotas_exceeded_list"("_root.base") AS "jarviQuotasReachedList", "public"."users_states_inmail_credits_are_empty"("_root.base") AS "linkedinInmailCreditsAreEmpty", "public"."users_states_open_profiles_limit_reached"("_root.base") AS "linkedinOpenProfilesLimitReached", "_root.ar.root.userLinkedinSeats"."userLinkedinSeats" AS "userLinkedinSeats", $4 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."users_states" WHERE ((EXISTS (SELECT $5 FROM "auth"."users" AS "__be_0_auth_users" WHERE (((("__be_0_auth_users"."id") = ("public"."users_states"."user_id")) AND ($6)) AND (($7) AND ((EXISTS (SELECT $8 FROM "public"."users_groups" AS "__be_1_users_groups" WHERE (((("__be_1_users_groups"."user_id") = ("__be_0_auth_users"."id")) AND ($9)) AND (($10) AND (((("__be_1_users_groups"."group_id") = ((($1->>$11))::uuid)) AND ($12)) AND ($13)))) )) AND ($14)))) )) AND (("public"."users_states"."user_id") = (($2)::uuid))) LIMIT $15 ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT (SELECT coalesce(json_agg("_sub_query"."userLinkedinSeats" ), $16 ) FROM (SELECT "_unnest_table"."userLinkedinSeats" AS "userLinkedinSeats" FROM UNNEST(array_agg("userLinkedinSeats" )) AS "_unnest_table"("userLinkedinSeats") LIMIT $17 ) AS "_sub_query" ) AS "userLinkedinSeats" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.userLinkedinSeats.base"."id" AS "id", "_root.ar.root.userLinkedinSeats.base"."user_id" AS "userId", "_root.ar.root.userLinkedinSeats.base"."linkedin_seat_id" AS "linkedinSeatId", "_root.ar.root.userLinkedinSeats.base"."created_at" AS "createdAt", "_root.ar.root.userLinkedinSeats.base"."updated_at" AS "updatedAt", "_root.ar.root.userLinkedinSeats.base"."linkedin_contract_id" AS "linkedinContractId", "_root.ar.root.userLinkedinSeats.base"."linkedin_contract_type" AS "linkedinContractType", "_root.ar.root.userLinkedinSeats.base"."linkedin_contract_level" AS "linkedinContractLevel", "_root.ar.root.userLinkedinSeats.base"."users_oauth_id" AS "usersOauthId", "_root.ar.root.userLinkedinSeats.base"."linkedin_inmails_credits_empty_at" AS "linkedinInmailsCreditsEmptyAt", "_root.ar.root.userLinkedinSeats.base"."linkedin_inmails_open_profiles_limit_reached_at" AS "linkedinInmailsOpenProfilesLimitReachedAt", "_root.ar.root.userLinkedinSeats.base"."server_session_status" AS "serverSessionStatus", $18 AS "__typename" ) AS "_e" ) ) AS "userLinkedinSeats" FROM (SELECT * FROM "public"."users_linkedinseats" WHERE ((("_root.base"."user_id") = ("user_id")) AND ((("public"."users_linkedinseats"."user_id") = ((($1->>$19))::uuid)) AND (("public"."users_linkedinseats"."deleted_at") IS NULL))) ) AS "_root.ar.root.userLinkedinSeats.base" ) AS "_root.ar.root.userLinkedinSeats" ) AS "_root.ar.root.userLinkedinSeats" ON ($20) ) AS "_root"
|
|
371 min
2%
|
18 ms
|
1,223,492
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $8 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."trigger_short_id" AS "shortId", "_root.base"."added_at" AS "addedAt", "_root.base"."birthday" AS "birthday", "_root.base"."can_send_inmail" AS "canSendInMail", "_root.base"."trigger_count_connexions_with_this_profile" AS "countConnexionsWithThisProfile", "_root.base"."trigger_count_invitations_scheduled_to_this_profile" AS "countInvitationsScheduledToThisProfile", "_root.base"."trigger_count_invitations_sent_to_this_profile" AS "countInvitationsSentToThisProfile", "_root.base"."trigger_count_applications_from_this_profile" AS "countApplicationsFromThisProfile", "_root.base"."trigger_count_messages_received_from_this_profile" AS "countMessagesReceivedFromThisProfile", "_root.base"."trigger_count_messages_scheduled_to_this_profile" AS "countMessagesScheduledToThisProfile", "_root.base"."trigger_count_messages_sent_to_this_profile" AS "countMessagesSentToThisProfile", "_root.base"."trigger_count_attached_files" AS "countAttachedFiles", "_root.base"."created_at" AS "createdAt", "_root.base"."created_by_userid" AS "createdByUserId", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."network_distance_level" AS "distance", "_root.base"."external_id" AS "externalId", "_root.base"."trigger_first_interaction_date" AS "firstInteractionDate", "_root.base"."trigger_first_name" AS "firstName", "_root.base"."first_name_parsed" AS "firstNameParsed", "_root.base"."first_name_manual" AS "firstNameManual", "_root.base"."group_id" AS "groupId", "_root.base"."trigger_count_resumes" AS "countResumes", "_root.base"."headline" AS "headline", "_root.base"."image_id" AS "imageId", "_root.base"."is_talent" AS "isTalent", "_root.base"."is_contact" AS "isContact", "_root.base"."is_hiring" AS "isHiring", "_root.base"."is_open_to_new_opportunities" AS "isOpenToNewOpportunities", "_root.base"."is_influencer" AS "isInfluencer", "_root.base"."is_premium" AS "isPremium", "_root.base"."trigger_last_interaction_date" AS "lastInteractionDate", "_root.base"."trigger_last_past_interaction_date" AS "lastPastInteractionDate", "_root.base"."trigger_last_interaction_type" AS "lastInteractionType", "_root.base"."last_resume_updated_at" AS "lastResumeUpdatedAt", "_root.base"."trigger_last_name" AS "lastName", "_root.base"."last_name_parsed" AS "lastNameParsed", "_root.base"."last_name_manual" AS "lastNameManual", "_root.base"."linkedin_id" AS "linkedinId", "_root.base"."member_id" AS "memberId", "_root.base"."profile_url" AS "profileUrl", "_root.base"."public_identifier" AS "publicIdentifier", "_root.base"."primary_locale" AS "primaryLocale", "_root.base"."search_string" AS "searchString", "_root.base"."source" AS "source", "_root.base"."status_id" AS "statusId", "_root.base"."talent_identifier" AS "talentIdentifier", "_root.base"."linkedin_sales_navigator_identifier" AS "linkedinSalesNavigatorIdentifier", "_root.base"."trigger_linkedin_significant_identifier" AS "linkedinSignificantIdentifier", "_root.base"."summary" AS "summary", "_root.base"."updated_at" AS "updatedAt", "_root.ar.root.pendingExecuteTriggerTasks"."pendingExecuteTriggerTasks" AS "pendingExecuteTriggerTasks", "_root.ar.root.unreadMessagesNotifications"."unreadMessagesNotifications" AS "unreadMessagesNotifications", "_root.ar.root.protectedCompaniesWorksIn"."protectedCompaniesWorksIn" AS "protectedCompaniesWorksIn", "_root.or.createdBy"."createdBy" AS "createdBy", "_root.or.image"."image" AS "image", "_root.ar.root.locations"."locations" AS "locations", "_root.ar.root.files"."files" AS "files", "_root.or.lastPosition"."lastPosition" AS "lastPosition", "_root.ar.root.positions"."positions" AS "positions", "_root.ar.root.manualHistoryEntries"."manualHistoryEntries" AS "manualHistoryEntries", "_root.ar.root.lastMessages"."lastMessages" AS "lastMessages", "_root.ar.root.locales"."locales" AS "locales", "_root.ar.root.educations"."educations" AS "educations", "_root.ar.root.skills"."skills" AS "skills", "_root.ar.root.fieldsValues"."fieldsValues" AS "fieldsValues", "_root.ar.root.emailAddresses"."emailAddresses" AS "emailAddresses", "_root.ar.root.phoneNumbers"."phoneNumbers" AS "phoneNumbers", "_root.ar.root.assignees"."assignees" AS "assignees", "_root.or.status"."status" AS "status", "_root.ar.root.associations"."associations" AS "associations", $9 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."profiles" WHERE (((("public"."profiles"."group_id") = ((($1->>$10))::uuid)) OR ((("public"."profiles"."group_id") IS NULL) AND (((($1->>$11))::uuid) IS NULL))) AND (("public"."profiles"."id") = (($7)::uuid))) ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.createdBy.base"."display_name" AS "displayName", "_root.or.createdBy.base"."id" AS "id", $12 AS "__typename" ) AS "_e" ) ) AS "createdBy" FROM (SELECT * FROM "auth"."users" WHERE ((("_root.base"."created_by_userid") = ("id")) AND ((EXISTS (SELECT $13 FROM "public"."users_groups" AS "__be_0_users_groups" WHERE (((("__be_0_users_groups"."user_id") = ("auth"."users"."id")) AND ($14)) AND (($15) AND (((("__be_0_users_groups"."group_id") = ((($1->>$16))::uuid)) AND ($17)) AND ($18)))) )) OR (("auth"."users"."id") = ((($1->>$19))::uuid)))) LIMIT $20 ) AS "_root.or.createdBy.base" ) AS "_root.or.createdBy" ON ($21) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "public"."images_public_url"("_root.or.image.base") AS "publicUrl", $22 AS "__typename" ) AS "_e" ) ) AS "image" FROM (SELECT * FROM "public"."images" WHERE (("_root.base"."image_id") = ("id")) LIMIT $23 ) AS "_root.or.image.base" ) AS "_root.or.image" ON ($24) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.status.base"."title" AS "title", "_root.or.status.base"."color_id" AS "colorId", "_root.or.status.base"."is_auto" AS "isAuto", "_root.or.status.base"."id" AS "id", "_root.or.status.base"."is_protected" AS "isProtected", $25 AS "__typename" ) AS "_e" ) ) AS "status" FROM (SELECT * FROM "public"."statuses" WHERE ((("_root.base"."status_id") = ("id")) AND (((("public"."statuses"."group_id") = ((($1->>$26))::uuid)) OR ((("public"."statuses"."group_id") IS NULL) AND (((($1->>$27))::uuid) IS NULL))) OR (("public"."statuses"."group_id") IS NULL))) LIMIT $28 ) AS "_root.or.status.base" ) AS "_root.or.status" ON ($29) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.lastPosition.base"."id" AS "id", "_root.or.lastPosition.base"."start_date" AS "startDate", "_root.or.lastPosition.base"."end_date" AS "endDate", "_root.or.lastPosition.base"."title" AS "title", "_root.or.lastPosition.base"."source" AS "source", "_root.or.lastPosition.base"."company_name" AS "companyName", "_root.or.lastPosition.base"."linkedin_company_id" AS "linkedinCompanyId", "_root.or.lastPosition.or.linkedinCompanyData"."linkedinCompanyData" AS "linkedinCompanyData", $30 AS "__typename" ) AS "_e" ) ) AS "lastPosition" FROM (SELECT * FROM "public"."profiles_positions_last_view" WHERE ((("_root.base"."id") = ("profile_id")) AND ((("public"."profiles_positions_last_view"."group_id") = ((($1->>$31))::uuid)) OR ((("public"."profiles_positions_last_view"."group_id") IS NULL) AND (((($1->>$32))::uuid) IS NULL)))) LIMIT $33 ) AS "_root.or.lastPosition.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.lastPosition.or.linkedinCompanyData.base"."id" AS "id", "_root.or.lastPosition.or.linkedinCompanyData.base"."name" AS "name", "_root.or.lastPosition.or.linkedinCompanyData.or.image"."image" AS "image", $34 AS "__typename" ) AS "_e" ) ) AS "linkedinCompanyData" FROM (SELECT * FROM "public"."linkedin_companies_data" WHERE (("_root.or.lastPosition.base"."linkedin_company_id") = ("id")) LIMIT $35 ) AS "_root.or.lastPosition.or.linkedinCompanyData.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "public"."images_public_url"("_root.or.lastPosition.or.linkedinCompanyData.or.image.base") AS "publicUrl", $36 AS "__typename" ) AS "_e" ) ) AS "image" FROM (SELECT * FROM "public"."images" WHERE (("_root.or.lastPosition.or.linkedinCompanyData.base"."image_id") = ("id")) LIMIT $37 ) AS "_root.or.lastPosition.or.linkedinCompanyData.or.image.base" ) AS "_root.or.lastPosition.or.linkedinCompanyData.or.image" ON ($38) ) AS "_root.or.lastPosition.or.linkedinCompanyData" ON ($39) ) AS "_root.or.lastPosition" ON ($40) LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("files" ORDER BY "root.ar.root.files.pg.created_at" DESC NULLS FIRST), $41 ) AS "files" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.files.base"."file_id" AS "fileId", "_root.ar.root.files.base"."created_at" AS "createdAt", "_root.ar.root.files.base"."updated_at" AS "updatedAt", "_root.ar.root.files.base"."should_be_parsed" AS "shouldBeParsed", "_root.ar.root.files.base"."parsed_at" AS "parsedAt", "_root.ar.root.files.base"."text_content" AS "textContent", "_root.ar.root.files.or.file"."file" AS "file", $42 AS "__typename" ) AS "_e" ) ) AS "files", "_root.ar.root.files.base"."created_at" AS "root.ar.root.files.pg.created_at" FROM (SELECT * FROM "public"."profiles_files" WHERE ((("_root.base"."id") = ("profile_id")) AND ((EXISTS (SELECT $43 FROM "public"."profiles" AS "__be_0_profiles" WHERE (((("__be_0_profiles"."id") = ("public"."profiles_files"."profile_id")) AND ($44)) AND (($45) AND ((((("__be_0_profiles"."group_id") = ((($1->>$46))::uuid)) OR ((("__be_0_profiles"."group_id") IS NULL) AND (((($1->>$47))::uuid) IS NULL))) AND ($48)) AND ($49)))) )) AND (("public"."profiles_files"."deleted_at") IS NULL))) ORDER BY "created_at" DESC NULLS FIRST ) AS "_root.ar.root.files.base" LEFT OUTER JOIN
|
|
303 min
2%
|
2 ms
|
10,624,472
nhost_hasura
|
WITH "_mra__tasks" AS (UPDATE "public"."tasks" SET "status" = ($1)::text,"group_id" = ($2)::uuid WHERE (((("public"."tasks"."group_id") = (($3)::uuid)) OR ((("public"."tasks"."group_id") IS NULL) AND ((($4)::uuid) IS NULL))) AND ((("public"."tasks"."id") = (($5)::uuid)) AND (NOT (("public"."tasks"."status") = ANY(($6)::text[]))))) RETURNING * , ($7)::boolean AS "check__constraint"), "_aca__tasks" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "type" , "status" , "parameters" , "return" , "user_id" , "retries" , "group_id" , "done_at" , "priority" , "return_status_code" , "profile_id" , "project_id" , "email_address" , "message_scheduled_id" , "linkedin_seat_id" , "file_id" , "external_id" , "oauth_account_id" , "version" , "since" , "duration" , "user_id_or_group_id" , "historyentry_id" , "phone_number_provider_id" , "retry_at" , "trigger_id" , "trigger_worker_type" , "recording_id" , "resume_when" , "skip_extension_queue_and_execute_immediately" , "cancel_at" , "dashboard_id" FROM "_mra__tasks" ) SELECT json_build_object($8, (SELECT coalesce(json_agg("root" ), $9 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."status" AS "status", "_root.base"."type" AS "type", "_root.base"."parameters" AS "parameters", "_root.base"."profile_id" AS "profileId", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", $10 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__tasks" WHERE ($11) ) AS "_root.base" ) AS "_root" ), $12, $13 ) , (SELECT coalesce(bool_and("check__constraint" ), $14 ) FROM "_mra__tasks" )
|
|
247 min
1%
|
2 ms
|
8,051,127
nhost_hasura
|
WITH "_mra__tasks" AS (INSERT INTO "public"."tasks" ( "user_id", "type", "priority", "parameters", "external_id", "group_id" ) VALUES (($1)::uuid, ($2)::text, ($3)::numeric, ($4)::jsonb, ($5)::text, ($6)::uuid) RETURNING * , ($7)::boolean AS "check__constraint"), "_aca__tasks" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "type" , "status" , "parameters" , "return" , "user_id" , "retries" , "group_id" , "done_at" , "priority" , "return_status_code" , "profile_id" , "project_id" , "email_address" , "message_scheduled_id" , "linkedin_seat_id" , "file_id" , "external_id" , "oauth_account_id" , "version" , "since" , "duration" , "user_id_or_group_id" , "historyentry_id" , "phone_number_provider_id" , "retry_at" , "trigger_id" , "trigger_worker_type" , "recording_id" , "resume_when" , "skip_extension_queue_and_execute_immediately" , "cancel_at" , "dashboard_id" FROM "_mra__tasks" ) SELECT (SELECT coalesce((json_agg("root" )->$8), $9 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."status" AS "status", "_root.base"."type" AS "type", "_root.base"."profile_id" AS "profileId", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", $10 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__tasks" WHERE ($11) ) AS "_root.base" ) AS "_root" ) , (SELECT coalesce(bool_and("check__constraint" ), $12 ) FROM "_mra__tasks" )
|
|
227 min
1%
|
38 ms
|
358,428
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $6 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."public_identifier" AS "publicIdentifier", "_root.base"."talent_identifier" AS "talentIdentifier", "_root.base"."linkedin_sales_navigator_identifier" AS "linkedinSalesNavigatorIdentifier", "_root.base"."member_id" AS "memberId", "_root.base"."linkedin_id" AS "linkedinId", "_root.base"."external_id" AS "externalId", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."trigger_linkedin_significant_identifier" AS "linkedinSignificantIdentifier", $7 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."profiles" WHERE (((("public"."profiles"."group_id") = ((($1->>$8))::uuid)) OR ((("public"."profiles"."group_id") IS NULL) AND (((($1->>$9))::uuid) IS NULL))) AND ((("public"."profiles"."public_identifier") = ANY(($2)::text[])) OR ((("public"."profiles"."member_id") = ANY(($3)::text[])) OR ((("public"."profiles"."linkedin_id") = ANY(($4)::integer[])) OR (("public"."profiles"."trigger_linkedin_significant_identifier") = ANY(($5)::text[])))))) ) AS "_root.base" ) AS "_root"
|
|
162 min
0.9%
|
0 ms
|
35,380,564
nhost_hasura
|
INSERT INTO hdb_catalog.event_invocation_logs (event_id, trigger_name, status, request, response)
VALUES ($1, $2, $3, $4, $5)
|
|
142 min
0.8%
|
1 ms
|
5,922,558
nhost_hasura
|
WITH "_mra__tasks" AS (UPDATE "public"."tasks" SET "status" = ($1)::text,"return" = ($2)::jsonb,"retry_at" = ($3)::timestamptz,"group_id" = ($4)::uuid WHERE (((("public"."tasks"."group_id") = (($5)::uuid)) OR ((("public"."tasks"."group_id") IS NULL) AND ((($6)::uuid) IS NULL))) AND ((("public"."tasks"."id") = (($7)::uuid)) AND (NOT (("public"."tasks"."status") = ANY(($8)::text[]))))) RETURNING * , ($9)::boolean AS "check__constraint"), "_aca__tasks" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "type" , "status" , "parameters" , "return" , "user_id" , "retries" , "group_id" , "done_at" , "priority" , "return_status_code" , "profile_id" , "project_id" , "email_address" , "message_scheduled_id" , "linkedin_seat_id" , "file_id" , "external_id" , "oauth_account_id" , "version" , "since" , "duration" , "user_id_or_group_id" , "historyentry_id" , "phone_number_provider_id" , "retry_at" , "trigger_id" , "trigger_worker_type" , "recording_id" , "resume_when" , "skip_extension_queue_and_execute_immediately" , "cancel_at" , "dashboard_id" FROM "_mra__tasks" ) SELECT json_build_object($10, (SELECT coalesce(json_agg("root" ), $11 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."status" AS "status", "_root.base"."type" AS "type", "_root.base"."parameters" AS "parameters", "_root.base"."profile_id" AS "profileId", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", $12 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__tasks" WHERE ($13) ) AS "_root.base" ) AS "_root" ), $14, $15 ) , (SELECT coalesce(bool_and("check__constraint" ), $16 ) FROM "_mra__tasks" )
|
|
131 min
0.8%
|
2 ms
|
4,835,137
nhost_hasura
|
WITH "_mra__tasks" AS (INSERT INTO "public"."tasks" ( "user_id", "status", "type", "priority", "parameters", "group_id" ) VALUES (($1)::uuid, ($2)::text, ($3)::text, ($4)::numeric, ($5)::jsonb, ($6)::uuid) RETURNING * , ($7)::boolean AS "check__constraint"), "_aca__tasks" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "type" , "status" , "parameters" , "return" , "user_id" , "retries" , "group_id" , "done_at" , "priority" , "return_status_code" , "profile_id" , "project_id" , "email_address" , "message_scheduled_id" , "linkedin_seat_id" , "file_id" , "external_id" , "oauth_account_id" , "version" , "since" , "duration" , "user_id_or_group_id" , "historyentry_id" , "phone_number_provider_id" , "retry_at" , "trigger_id" , "trigger_worker_type" , "recording_id" , "resume_when" , "skip_extension_queue_and_execute_immediately" , "cancel_at" , "dashboard_id" FROM "_mra__tasks" ) SELECT (SELECT coalesce((json_agg("root" )->$8), $9 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."status" AS "status", "_root.base"."type" AS "type", "_root.base"."profile_id" AS "profileId", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", $10 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__tasks" WHERE ($11) ) AS "_root.base" ) AS "_root" ) , (SELECT coalesce(bool_and("check__constraint" ), $12 ) FROM "_mra__tasks" )
|
|
115 min
0.7%
|
11 ms
|
631,813
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."name" AS "name", "_root.base"."user_id" AS "userId", "_root.base"."linkedin_id" AS "linkedinId", "_root.base"."created_at" AS "createdAt", "_root.base"."updated_at" AS "updatedAt", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."color_id" AS "colorId", "_root.base"."preset_id" AS "presetId", "_root.base"."is_made_for_recruitment" AS "isMadeForRecruitment", "_root.base"."is_made_for_sales" AS "isMadeForSales", "_root.base"."group_id" AS "groupId", "_root.or.group"."group" AS "group", "_root.or.user"."user" AS "user", "_root.ar.root.users"."users" AS "users", "_root.ar.root.assignees"."assignees" AS "assignees", "_root.base"."linkedin_contract_id" AS "linkedinContractId", "_root.base"."status_id" AS "statusId", "_root.base"."ignore_history_before_project_created_at" AS "ignoreHistoryBeforeProjectCreatedAt", "_root.base"."company_id" AS "companyId", "_root.base"."external_id" AS "externalId", "_root.base"."reference_id" AS "referenceId", "_root.base"."linkedin_id_type" AS "linkedinIdType", "_root.base"."trigger_short_id" AS "shortId", "_root.ar.root.files"."files" AS "files", "_root.or.status"."status" AS "status", "_root.or.company"."company" AS "company", "_root.ar.root.fieldsValues"."fieldsValues" AS "fieldsValues", "_root.ar.root.jobBoardsOffers"."jobBoardsOffers" AS "jobBoardsOffers", "_root.ar.root.projectJobBoards"."projectJobBoards" AS "projectJobBoards", "_root.ar.root.profilesCountPerStatusGroup"."profilesCountPerStatusGroup" AS "profilesCountPerStatusGroup", $5 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."projects" WHERE (((("public"."projects"."group_id") = ((($1->>$6))::uuid)) OR ((("public"."projects"."group_id") IS NULL) AND (((($1->>$7))::uuid) IS NULL))) AND (("public"."projects"."id") = ANY(($3)::uuid[]))) LIMIT $8 ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.company.base"."id" AS "id", "_root.or.company.base"."description" AS "description", "_root.or.company.base"."website" AS "website", "_root.or.company.base"."trigger_name" AS "name", "_root.or.company.or.image"."image" AS "image", "_root.or.company.or.parent"."parent" AS "parent", "_root.or.company.or.linkedinCompanyData"."linkedinCompanyData" AS "linkedinCompanyData", "_root.or.company.or.legaldata"."legaldata" AS "legaldata", $9 AS "__typename" ) AS "_e" ) ) AS "company" FROM (SELECT * FROM "public"."companies" WHERE ((("_root.base"."company_id") = ("id")) AND (("public"."companies"."group_id") = ((($1->>$10))::uuid))) LIMIT $11 ) AS "_root.or.company.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.company.or.linkedinCompanyData.base"."id" AS "id", "_root.or.company.or.linkedinCompanyData.base"."name" AS "name", "_root.or.company.or.linkedinCompanyData.base"."tagline" AS "tagline", "_root.or.company.or.linkedinCompanyData.base"."description" AS "description", "_root.or.company.or.linkedinCompanyData.base"."founded_at" AS "foundedAt", "_root.or.company.or.linkedinCompanyData.base"."linkedin_employee_count" AS "linkedinEmployeeCount", "_root.or.company.or.linkedinCompanyData.base"."linkedin_employee_start_count" AS "linkedinEmployeeStartCount", "_root.or.company.or.linkedinCompanyData.base"."linkedin_employee_end_count" AS "linkedinEmployeeEndCount", "_root.or.company.or.linkedinCompanyData.base"."linkedin_url" AS "linkedinUrl", "_root.or.company.or.linkedinCompanyData.base"."website" AS "website", "_root.or.company.or.linkedinCompanyData.or.image"."image" AS "image", $12 AS "__typename" ) AS "_e" ) ) AS "linkedinCompanyData" FROM (SELECT * FROM "public"."linkedin_companies_data" WHERE (("_root.or.company.base"."linkedin_company_id") = ("id")) LIMIT $13 ) AS "_root.or.company.or.linkedinCompanyData.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "public"."images_public_url"("_root.or.company.or.linkedinCompanyData.or.image.base") AS "publicUrl", $14 AS "__typename" ) AS "_e" ) ) AS "image" FROM (SELECT * FROM "public"."images" WHERE (("_root.or.company.or.linkedinCompanyData.base"."image_id") = ("id")) LIMIT $15 ) AS "_root.or.company.or.linkedinCompanyData.or.image.base" ) AS "_root.or.company.or.linkedinCompanyData.or.image" ON ($16) ) AS "_root.or.company.or.linkedinCompanyData" ON ($17) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.company.or.parent.base"."id" AS "id", "_root.or.company.or.parent.base"."trigger_name" AS "name", "_root.or.company.or.parent.or.linkedinCompanyData"."linkedinCompanyData" AS "linkedinCompanyData", $18 AS "__typename" ) AS "_e" ) ) AS "parent" FROM (SELECT * FROM "public"."companies" WHERE ((("_root.or.company.base"."parent_id") = ("id")) AND (("public"."companies"."group_id") = ((($1->>$19))::uuid))) LIMIT $20 ) AS "_root.or.company.or.parent.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.company.or.parent.or.linkedinCompanyData.base"."name" AS "name", $21 AS "__typename" ) AS "_e" ) ) AS "linkedinCompanyData" FROM (SELECT * FROM "public"."linkedin_companies_data" WHERE (("_root.or.company.or.parent.base"."linkedin_company_id") = ("id")) LIMIT $22 ) AS "_root.or.company.or.parent.or.linkedinCompanyData.base" ) AS "_root.or.company.or.parent.or.linkedinCompanyData" ON ($23) ) AS "_root.or.company.or.parent" ON ($24) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "public"."images_public_url"("_root.or.company.or.image.base") AS "publicUrl", $25 AS "__typename" ) AS "_e" ) ) AS "image" FROM (SELECT * FROM "public"."images" WHERE (("_root.or.company.base"."image_id") = ("id")) LIMIT $26 ) AS "_root.or.company.or.image.base" ) AS "_root.or.company.or.image" ON ($27) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.company.or.legaldata.base"."id" AS "id", "_root.or.company.or.legaldata.base"."activity" AS "activity", "_root.or.company.or.legaldata.base"."codenaf" AS "codenaf", "_root.or.company.or.legaldata.base"."legal_name" AS "legalName", "_root.or.company.or.legaldata.base"."siren" AS "siren", $28 AS "__typename" ) AS "_e" ) ) AS "legaldata" FROM (SELECT * FROM "public"."companies_legaldata" WHERE (("_root.or.company.base"."id") = ("company_id")) LIMIT $29 ) AS "_root.or.company.or.legaldata.base" ) AS "_root.or.company.or.legaldata" ON ($30) ) AS "_root.or.company" ON ($31) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.user.base"."display_name" AS "displayName", "_root.or.user.base"."email" AS "email", "_root.or.user.base"."id" AS "id", "_root.or.user.base"."disabled" AS "disabled", $32 AS "__typename" ) AS "_e" ) ) AS "user" FROM (SELECT * FROM "auth"."users" WHERE ((("_root.base"."user_id") = ("id")) AND ((EXISTS (SELECT $33 FROM "public"."users_groups" AS "__be_0_users_groups" WHERE (((("__be_0_users_groups"."user_id") = ("auth"."users"."id")) AND ($34)) AND (($35) AND (((("__be_0_users_groups"."group_id") = ((($1->>$36))::uuid)) AND ($37)) AND ($38)))) )) OR (("auth"."users"."id") = ((($1->>$39))::uuid)))) LIMIT $40 ) AS "_root.or.user.base" ) AS "_root.or.user" ON ($41) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.status.base"."title" AS "title", "_root.or.status.base"."color_id" AS "colorId", "_root.or.status.base"."is_auto" AS "isAuto", "_root.or.status.base"."id" AS "id", "_root.or.status.base"."is_archived" AS "isArchived", $42 AS "__typename" ) AS "_e" ) ) AS "status" FROM (SELECT * FROM "public"."statuses" WHERE ((("_root.base"."status_id") = ("id")) AND (((("public"."statuses"."group_id") = ((($1->>$43))::uuid)) OR ((("public"."statuses"."group_id") IS NULL) AND (((($1->>$44))::uuid) IS NULL))) OR (("public"."statuses"."group_id") IS NULL))) LIMIT $45 ) AS "_root.or.status.base" ) AS "_root.or.status" ON ($46) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.group.base"."id" AS "id", "_root.or.group.base"."name" AS "name", $47 AS "__typename" ) AS "_e" ) ) AS "group" FROM (SELECT * FROM "public"."groups" WHERE ((("_root.base"."group_id") = ("id")) AND (("public"."groups"."id") = ((($1->>$48))::uuid))) LIMIT $49 ) AS "_root.or.group.base" ) AS "_root.or.group" ON ($50) LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("fieldsValues" ORDER BY "root.ar.root.fieldsValues.or.field.pg.created_at" ASC NULLS LAST), $51 ) AS "fieldsValues" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.fieldsValues.base"."id" AS "id", "_root.ar.root.fieldsValues.or.field"."field" AS "field", "_root.ar.root.fieldsValues.or.fieldValue"."fieldValue" AS "fieldValue", "_root.ar.root.fieldsValues.or.location"."location" AS "location", "_root.ar.root.fieldsValues.base"."value" AS "value", $52 AS "__typename" ) AS "_e" ) ) AS "fieldsValues", "_root.ar.root.fieldsValues.or.field"."root.ar.root.fieldsValues.or.field.pg.created_at" AS "root.ar.root.fieldsValues.or.field.pg.created_at" FROM (SELECT * FROM "public"."projects_fieldsvalues" WHERE ((("_root.base"."id") = ("project_id")) AND ((("public"."projects_fieldsvalues"."group_id") = ((($1->>$53))::uuid)) AND ((("public"."projects_fieldsvalues"."deleted_at") IS NULL) AND (((("public"."projects_fieldsvalues"."fieldvalue_id") IS NULL) OR (EXISTS (SELECT $54 FROM "public"."fieldsvalues" AS "__be_0_fieldsvalues" WHERE (((("__be_0_fieldsvalues"."id") = ("public"."projects_fieldsvalues"."fieldvalue_id")) AND ($55)) AND (($56) AND (((("__be_0_fieldsvalues"."deleted_at") IS NULL) AND ($57)) AND ($58)))) ))) AND (EXISTS (SEL
|
|
107 min
0.6%
|
4 ms
|
1,812,535
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."profiles_sync_tasks_count" AS "profilesSyncTasksCount", "_root.base"."send_emails_remaining_count" AS "sendEmailsRemainingCount", "_root.base"."send_sms_remaining_count" AS "sendSmsRemainingCount", "_root.base"."send_linkedin_inmails_remaining_count" AS "sendLinkedinInmailsRemainingCount", "_root.base"."send_linkedin_invitations_remaining_count" AS "sendLinkedinInvitationsRemainingCount", "_root.base"."send_linkedin_messages_remaining_count" AS "sendLinkedinMessagesRemainingCount", "_root.base"."send_telegram_message_remaining_count" AS "sendTelegramMessageRemainingCount", "_root.base"."send_whatsapp_message_remaining_count" AS "sendWhatsappMessageRemainingCount", "_root.base"."sync_linkedin_connections_remaining_count" AS "syncLinkedinConnectionsRemainingCount", "_root.base"."sync_linkedin_invitations_sent_remaining_count" AS "syncLinkedinInvitationsSentRemainingCount", "_root.base"."sync_linkedin_jobs_remaining_count" AS "syncLinkedinJobsRemainingCount", "_root.base"."sync_linkedin_messages_remaining_count" AS "syncLinkedinMessagesRemainingCount", "_root.base"."sync_linkedin_talent_inmails_remaining_count" AS "syncLinkedinTalentInmailsRemainingCount", "_root.base"."sync_linkedin_talent_project_profiles_remaining_count" AS "syncLinkedinTalentProjectProfilesRemainingCount", "_root.base"."triggers_to_execute_tasks_count" AS "triggersToExecuteTasksCount", "_root.base"."user_id" AS "userId", $4 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."tasks_pending_metrics" WHERE (((("public"."tasks_pending_metrics"."user_id") = ((($1->>$5))::uuid)) OR ((("public"."tasks_pending_metrics"."user_id") IS NULL) AND (((($1->>$6))::uuid) IS NULL))) AND (("public"."tasks_pending_metrics"."user_id") = (($2)::uuid))) LIMIT $7 ) AS "_root.base" ) AS "_root"
|
|
97 min
0.6%
|
276 ms
|
21,146
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."count_unread_messages" AS "countUnreadMessages", "_root.base"."count_in_process_for_a_long_time" AS "countInProcessForALongTime", "_root.base"."count_possible_reminders" AS "countPossibleReminders", "_root.base"."count_profiles_with_history_before_this_project" AS "countProfilesWithHistoryBeforeThisProject", "_root.base"."count_applicants" AS "countApplicants", $4 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."projects_metrics" WHERE (("public"."projects_metrics"."id") = ANY(($2)::uuid[])) ) AS "_root.base" ) AS "_root"
|
|
87 min
0.5%
|
0 ms
|
12,504,671
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."daily_quota_threshold" AS "dailyQuotaThreshold", $4 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."quotas" WHERE (((("public"."quotas"."user_id") = ((($1->>$5))::uuid)) OR ((("public"."quotas"."user_id") IS NULL) AND (((($1->>$6))::uuid) IS NULL))) AND (("public"."quotas"."type") = (($2)::text))) LIMIT $7 ) AS "_root.base" ) AS "_root"
|
|
85 min
0.5%
|
35 ms
|
144,001
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."trigger_short_id" AS "shortId", "_root.base"."added_at" AS "addedAt", "_root.base"."birthday" AS "birthday", "_root.base"."can_send_inmail" AS "canSendInMail", "_root.base"."created_at" AS "createdAt", "_root.base"."created_by_userid" AS "createdByUserId", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."network_distance_level" AS "distance", "_root.base"."external_id" AS "externalId", "_root.base"."trigger_first_name" AS "firstName", "_root.base"."first_name_parsed" AS "firstNameParsed", "_root.base"."first_name_manual" AS "firstNameManual", "_root.base"."group_id" AS "groupId", "_root.base"."headline" AS "headline", "_root.base"."image_id" AS "imageId", "_root.base"."is_talent" AS "isTalent", "_root.base"."is_contact" AS "isContact", "_root.base"."is_hiring" AS "isHiring", "_root.base"."is_open_to_new_opportunities" AS "isOpenToNewOpportunities", "_root.base"."is_influencer" AS "isInfluencer", "_root.base"."is_premium" AS "isPremium", "_root.base"."last_resume_updated_at" AS "lastResumeUpdatedAt", "_root.base"."trigger_last_interaction_date" AS "lastInteractionDate", "_root.base"."trigger_last_interaction_type" AS "lastInteractionType", "_root.base"."trigger_last_name" AS "lastName", "_root.base"."last_name_parsed" AS "lastNameParsed", "_root.base"."last_name_manual" AS "lastNameManual", "_root.base"."linkedin_id" AS "linkedinId", "_root.base"."member_id" AS "memberId", "_root.base"."profile_url" AS "profileUrl", "_root.base"."public_identifier" AS "publicIdentifier", "_root.base"."primary_locale" AS "primaryLocale", "_root.base"."search_string" AS "searchString", "_root.base"."source" AS "source", "_root.base"."status_id" AS "statusId", "_root.base"."talent_identifier" AS "talentIdentifier", "_root.base"."linkedin_sales_navigator_identifier" AS "linkedinSalesNavigatorIdentifier", "_root.base"."trigger_linkedin_significant_identifier" AS "linkedinSignificantIdentifier", "_root.base"."summary" AS "summary", "_root.base"."updated_at" AS "updatedAt", "_root.base"."trigger_count_connexions_with_this_profile" AS "countConnexionsWithThisProfile", "_root.base"."trigger_count_invitations_scheduled_to_this_profile" AS "countInvitationsScheduledToThisProfile", "_root.base"."trigger_count_invitations_sent_to_this_profile" AS "countInvitationsSentToThisProfile", "_root.base"."trigger_count_applications_from_this_profile" AS "countApplicationsFromThisProfile", "_root.base"."trigger_count_messages_received_from_this_profile" AS "countMessagesReceivedFromThisProfile", "_root.base"."trigger_count_messages_scheduled_to_this_profile" AS "countMessagesScheduledToThisProfile", "_root.base"."trigger_count_messages_sent_to_this_profile" AS "countMessagesSentToThisProfile", "_root.base"."trigger_count_resumes" AS "countResumes", "_root.base"."trigger_count_attached_files" AS "countAttachedFiles", "_root.base"."trigger_last_past_interaction_date" AS "lastPastInteractionDate", "_root.or.createdBy"."createdBy" AS "createdBy", "_root.or.image"."image" AS "image", "_root.ar.root.locations"."locations" AS "locations", "_root.ar.root.files"."files" AS "files", "_root.or.lastPosition"."lastPosition" AS "lastPosition", "_root.ar.root.locales"."locales" AS "locales", "_root.ar.root.educations"."educations" AS "educations", "_root.ar.root.fieldsValues"."fieldsValues" AS "fieldsValues", "_root.ar.root.emailAddresses"."emailAddresses" AS "emailAddresses", "_root.ar.root.phoneNumbers"."phoneNumbers" AS "phoneNumbers", "_root.ar.root.assignees"."assignees" AS "assignees", "_root.or.status"."status" AS "status", "_root.ar.root.associations"."associations" AS "associations", $4 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."profiles" WHERE (((("public"."profiles"."group_id") = ((($1->>$5))::uuid)) OR ((("public"."profiles"."group_id") IS NULL) AND (((($1->>$6))::uuid) IS NULL))) AND (("public"."profiles"."id") = ANY(($2)::uuid[]))) ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.createdBy.base"."display_name" AS "displayName", "_root.or.createdBy.base"."id" AS "id", $7 AS "__typename" ) AS "_e" ) ) AS "createdBy" FROM (SELECT * FROM "auth"."users" WHERE ((("_root.base"."created_by_userid") = ("id")) AND ((EXISTS (SELECT $8 FROM "public"."users_groups" AS "__be_0_users_groups" WHERE (((("__be_0_users_groups"."user_id") = ("auth"."users"."id")) AND ($9)) AND (($10) AND (((("__be_0_users_groups"."group_id") = ((($1->>$11))::uuid)) AND ($12)) AND ($13)))) )) OR (("auth"."users"."id") = ((($1->>$14))::uuid)))) LIMIT $15 ) AS "_root.or.createdBy.base" ) AS "_root.or.createdBy" ON ($16) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "public"."images_public_url"("_root.or.image.base") AS "publicUrl", $17 AS "__typename" ) AS "_e" ) ) AS "image" FROM (SELECT * FROM "public"."images" WHERE (("_root.base"."image_id") = ("id")) LIMIT $18 ) AS "_root.or.image.base" ) AS "_root.or.image" ON ($19) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.status.base"."title" AS "title", "_root.or.status.base"."color_id" AS "colorId", "_root.or.status.base"."is_auto" AS "isAuto", "_root.or.status.base"."id" AS "id", "_root.or.status.base"."is_protected" AS "isProtected", $20 AS "__typename" ) AS "_e" ) ) AS "status" FROM (SELECT * FROM "public"."statuses" WHERE ((("_root.base"."status_id") = ("id")) AND (((("public"."statuses"."group_id") = ((($1->>$21))::uuid)) OR ((("public"."statuses"."group_id") IS NULL) AND (((($1->>$22))::uuid) IS NULL))) OR (("public"."statuses"."group_id") IS NULL))) LIMIT $23 ) AS "_root.or.status.base" ) AS "_root.or.status" ON ($24) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.lastPosition.base"."id" AS "id", "_root.or.lastPosition.base"."start_date" AS "startDate", "_root.or.lastPosition.base"."end_date" AS "endDate", "_root.or.lastPosition.base"."title" AS "title", "_root.or.lastPosition.base"."source" AS "source", "_root.or.lastPosition.base"."company_name" AS "companyName", "_root.or.lastPosition.base"."linkedin_company_id" AS "linkedinCompanyId", "_root.or.lastPosition.or.linkedinCompanyData"."linkedinCompanyData" AS "linkedinCompanyData", $25 AS "__typename" ) AS "_e" ) ) AS "lastPosition" FROM (SELECT * FROM "public"."profiles_positions_last_view" WHERE ((("_root.base"."id") = ("profile_id")) AND ((("public"."profiles_positions_last_view"."group_id") = ((($1->>$26))::uuid)) OR ((("public"."profiles_positions_last_view"."group_id") IS NULL) AND (((($1->>$27))::uuid) IS NULL)))) LIMIT $28 ) AS "_root.or.lastPosition.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.lastPosition.or.linkedinCompanyData.base"."id" AS "id", "_root.or.lastPosition.or.linkedinCompanyData.base"."name" AS "name", "_root.or.lastPosition.or.linkedinCompanyData.or.image"."image" AS "image", $29 AS "__typename" ) AS "_e" ) ) AS "linkedinCompanyData" FROM (SELECT * FROM "public"."linkedin_companies_data" WHERE (("_root.or.lastPosition.base"."linkedin_company_id") = ("id")) LIMIT $30 ) AS "_root.or.lastPosition.or.linkedinCompanyData.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "public"."images_public_url"("_root.or.lastPosition.or.linkedinCompanyData.or.image.base") AS "publicUrl", $31 AS "__typename" ) AS "_e" ) ) AS "image" FROM (SELECT * FROM "public"."images" WHERE (("_root.or.lastPosition.or.linkedinCompanyData.base"."image_id") = ("id")) LIMIT $32 ) AS "_root.or.lastPosition.or.linkedinCompanyData.or.image.base" ) AS "_root.or.lastPosition.or.linkedinCompanyData.or.image" ON ($33) ) AS "_root.or.lastPosition.or.linkedinCompanyData" ON ($34) ) AS "_root.or.lastPosition" ON ($35) LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("files" ORDER BY "root.ar.root.files.pg.created_at" DESC NULLS FIRST), $36 ) AS "files" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.files.base"."file_id" AS "fileId", "_root.ar.root.files.base"."created_at" AS "createdAt", "_root.ar.root.files.base"."updated_at" AS "updatedAt", "_root.ar.root.files.base"."should_be_parsed" AS "shouldBeParsed", "_root.ar.root.files.base"."parsed_at" AS "parsedAt", "_root.ar.root.files.base"."profile_id" AS "profileId", "_root.ar.root.files.or.file"."file" AS "file", $37 AS "__typename" ) AS "_e" ) ) AS "files", "_root.ar.root.files.base"."created_at" AS "root.ar.root.files.pg.created_at" FROM (SELECT * FROM "public"."profiles_files" WHERE ((("_root.base"."id") = ("profile_id")) AND ((EXISTS (SELECT $38 FROM "public"."profiles" AS "__be_0_profiles" WHERE (((("__be_0_profiles"."id") = ("public"."profiles_files"."profile_id")) AND ($39)) AND (($40) AND ((((("__be_0_profiles"."group_id") = ((($1->>$41))::uuid)) OR ((("__be_0_profiles"."group_id") IS NULL) AND (((($1->>$42))::uuid) IS NULL))) AND ($43)) AND ($44)))) )) AND (("public"."profiles_files"."deleted_at") IS NULL))) ORDER BY "created_at" DESC NULLS FIRST ) AS "_root.ar.root.files.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.files.or.file.base"."id" AS "id", "_root.ar.root.files.or.file.base"."name" AS "name", "_root.ar.root.files.or.file.base"."etag" AS "etag", "_root.ar.root.files.or.file.base"."mime_type" AS "mimeType", $45 AS "__typename" ) AS "_e" ) ) AS "file" FROM (SELECT * FROM "storage"."files" WHERE (("_root.ar.root.files.base"."file_id") = ("id")) LIMIT $46 ) AS "_root.ar.root.files.or.file.base" ) AS "_root.ar.root.files.or.file" ON ($47) ORDER BY "root.ar.root.files.pg.created_at" DESC NULLS FIRST ) AS "_root.ar.root.files" ) AS "_root.a
|
|
74 min
0.4%
|
2 ms
|
1,831,868
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $6 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."created_at" AS "createdAt", "_root.base"."updated_at" AS "updatedAt", "_root.base"."user_id" AS "userId", "_root.base"."external_id" AS "externalId", "_root.base"."linkedin_seat_id" AS "linkedinSeatId", "_root.base"."last_event_at" AS "lastEventAt", "_root.base"."type" AS "type", "_root.base"."profile_member_id" AS "profileMemberId", "_root.base"."profile_talent_identifier" AS "profileTalentIdentifier", "_root.base"."profile_sales_navigator_identifier" AS "profileSalesNavigatorIdentifier", "_root.base"."trigger_profile_significant_identifier" AS "profileSignificantIdentifier", "_root.base"."email_address" AS "emailAddress", "_root.base"."oauth_account_id" AS "oauthAccountId", "public"."threads_last_fetched_at"("_root.base") AS "lastFetchedAt", "_root.ar.root.pendingTasks"."pendingTasks" AS "pendingTasks", $7 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."threads" WHERE ((("public"."threads"."user_id") = ((($1->>$8))::uuid)) AND ((("public"."threads"."user_id") = (($3)::uuid)) AND ((("public"."threads"."type") = (($4)::text)) AND (("public"."threads"."external_id") = ANY(($5)::text[]))))) LIMIT $9 ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT json_build_object($10, json_build_object($11, COUNT(*), $12, $13 ), $14, coalesce($15, (bool_or($16))::text ) ) AS "pendingTasks" FROM (SELECT $17 FROM (SELECT * FROM "public"."tasks" WHERE ((("_root.base"."external_id") = ("external_id")) AND (((("public"."tasks"."deleted_at") IS NULL) AND ((("public"."tasks"."group_id") = ((($1->>$18))::uuid)) OR ((("public"."tasks"."group_id") IS NULL) AND (((($1->>$19))::uuid) IS NULL)))) AND ((("public"."tasks"."deleted_at") IS NULL) AND (("public"."tasks"."status") = ANY(($2)::text[]))))) ) AS "_root.ar.root.pendingTasks.base" ) AS "_root.ar.root.pendingTasks" ) AS "_root.ar.root.pendingTasks" ON ($20) ) AS "_root"
|
|
72 min
0.4%
|
22 ms
|
193,774
nhost_hasura
|
WITH "_mra__threads" AS (INSERT INTO "public"."threads" ( "user_id", "last_event_at", "linkedin_seat_id", "type", "profile_talent_identifier", "external_id" ) VALUES (($1)::uuid, ($2)::timestamptz, ($3)::integer, ($4)::text, ($5)::text, ($6)::text), (($7)::uuid, ($8)::timestamptz, ($9)::integer, ($10)::text, ($11)::text, ($12)::text), (($13)::uuid, ($14)::timestamptz, ($15)::integer, ($16)::text, ($17)::text, ($18)::text), (($19)::uuid, ($20)::timestamptz, ($21)::integer, ($22)::text, ($23)::text, ($24)::text), (($25)::uuid, ($26)::timestamptz, ($27)::integer, ($28)::text, ($29)::text, ($30)::text), (($31)::uuid, ($32)::timestamptz, ($33)::integer, ($34)::text, ($35)::text, ($36)::text), (($37)::uuid, ($38)::timestamptz, ($39)::integer, ($40)::text, ($41)::text, ($42)::text), (($43)::uuid, ($44)::timestamptz, ($45)::integer, ($46)::text, ($47)::text, ($48)::text), (($49)::uuid, ($50)::timestamptz, ($51)::integer, ($52)::text, ($53)::text, ($54)::text), (($55)::uuid, ($56)::timestamptz, ($57)::integer, ($58)::text, ($59)::text, ($60)::text), (($61)::uuid, ($62)::timestamptz, ($63)::integer, ($64)::text, ($65)::text, ($66)::text), (($67)::uuid, ($68)::timestamptz, ($69)::integer, ($70)::text, ($71)::text, ($72)::text), (($73)::uuid, ($74)::timestamptz, ($75)::integer, ($76)::text, ($77)::text, ($78)::text), (($79)::uuid, ($80)::timestamptz, ($81)::integer, ($82)::text, ($83)::text, ($84)::text), (($85)::uuid, ($86)::timestamptz, ($87)::integer, ($88)::text, ($89)::text, ($90)::text) ON CONFLICT ON CONSTRAINT "threads_user_id_external_id_trigger_profile_significant_identif" DO UPDATE SET "profile_member_id" = EXCLUDED."profile_member_id","last_event_at" = EXCLUDED."last_event_at","email_address" = EXCLUDED."email_address","linkedin_seat_id" = EXCLUDED."linkedin_seat_id","type" = EXCLUDED."type","oauth_account_id" = EXCLUDED."oauth_account_id","profile_talent_identifier" = EXCLUDED."profile_talent_identifier","profile_sales_navigator_identifier" = EXCLUDED."profile_sales_navigator_identifier" WHERE ((((("public"."threads"."user_id") = (($91)::uuid)) AND ($92)) AND ($93)) AND ($94)) RETURNING * , CASE WHEN ("public"."threads"."xmax") = ($95) THEN ($96)::boolean ELSE (((("public"."threads"."user_id") = (($97)::uuid)) AND ($98)) AND ($99))::boolean END AS "check__constraint"), "_aca__threads" AS (SELECT "id" , "created_at" , "updated_at" , "user_id" , "external_id" , "linkedin_seat_id" , "last_event_at" , "type" , "profile_linkedin_id" , "profile_talent_identifier" , "profile_sales_navigator_identifier" , "trigger_profile_significant_identifier" , "profile_member_id" , "email_address" , "oauth_account_id" , "canonical_phone_number" FROM "_mra__threads" ) SELECT json_build_object($100, (SELECT coalesce(json_agg("root" ), $101 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", $102 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__threads" WHERE ($103) ) AS "_root.base" ) AS "_root" ), $104, $105 ) , (SELECT coalesce(bool_and("check__constraint" ), $106 ) FROM "_mra__threads" )
|
|
70 min
0.4%
|
30 ms
|
139,524
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $5 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."profile_id" AS "profileId", "_root.base"."external_id" AS "externalId", $6 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."historyentries" WHERE ((((("public"."historyentries"."group_id") = ((($1->>$7))::uuid)) OR ((("public"."historyentries"."group_id") IS NULL) AND (((($1->>$8))::uuid) IS NULL))) AND (("public"."historyentries"."trigger_is_confidentiality_forced") = (($9)::boolean))) AND ((("public"."historyentries"."profile_id") = ANY(($2)::uuid[])) AND ((("public"."historyentries"."type") = (($3)::text)) AND ((("public"."historyentries"."user_id") = (($4)::uuid)) AND (("public"."historyentries"."deleted_at") IS NULL))))) LIMIT $10 ) AS "_root.base" ) AS "_root"
|
|
69 min
0.4%
|
2 ms
|
2,246,225
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."created_at" AS "createdAt", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."data" AS "data", "_root.base"."id" AS "id", "_root.base"."external_id" AS "externalId", "_root.base"."external_thread_id" AS "externalThreadId", "_root.base"."message" AS "message", "_root.base"."subject" AS "subject", "_root.base"."event_start_at" AS "eventStartAt", "_root.base"."event_end_at" AS "eventEndAt", "_root.base"."type" AS "type", "_root.base"."updated_at" AS "updatedAt", "_root.base"."user_id" AS "userId", "_root.base"."linkedin_seat_id" AS "linkedinSeatId", "_root.base"."emailAddress" AS "emailAddress", "_root.base"."profile_id" AS "profileId", "public"."historyentries_is_invitation_reply_email"("_root.base") AS "isInvitationReplyEmail", "_root.ar.root.files"."files" AS "files", "_root.base"."jobboard_offer_id" AS "jobBoardOfferId", "_root.or.profile"."profile" AS "profile", $4 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."historyentries" WHERE ((((("public"."historyentries"."group_id") = ((($1->>$5))::uuid)) OR ((("public"."historyentries"."group_id") IS NULL) AND (((($1->>$6))::uuid) IS NULL))) AND (("public"."historyentries"."trigger_is_confidentiality_forced") = (($7)::boolean))) AND (("public"."historyentries"."external_id") = ANY(($2)::text[]))) LIMIT $8 ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.profile.base"."id" AS "id", "_root.or.profile.base"."external_id" AS "externalId", "_root.or.profile.base"."trigger_last_name" AS "lastName", "_root.or.profile.base"."trigger_first_name" AS "firstName", "_root.or.profile.base"."member_id" AS "memberId", "_root.or.profile.base"."linkedin_id" AS "linkedinId", "_root.or.profile.base"."public_identifier" AS "publicIdentifier", "_root.or.profile.base"."talent_identifier" AS "talentIdentifier", "_root.or.profile.base"."linkedin_sales_navigator_identifier" AS "linkedinSalesNavigatorIdentifier", "_root.or.profile.base"."network_distance_level" AS "distance", "_root.or.profile.base"."deleted_at" AS "deletedAt", "_root.or.profile.base"."source" AS "source", "_root.or.profile.ar.profile.files"."files" AS "files", "_root.or.profile.ar.profile.associations"."associations" AS "associations", $9 AS "__typename" ) AS "_e" ) ) AS "profile" FROM (SELECT * FROM "public"."profiles" WHERE ((("_root.base"."profile_id") = ("id")) AND ((("public"."profiles"."group_id") = ((($1->>$10))::uuid)) OR ((("public"."profiles"."group_id") IS NULL) AND (((($1->>$11))::uuid) IS NULL)))) LIMIT $12 ) AS "_root.or.profile.base" LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("files" ), $13 ) AS "files" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.profile.ar.profile.files.base"."file_id" AS "fileId", $14 AS "__typename" ) AS "_e" ) ) AS "files" FROM (SELECT * FROM "public"."profiles_files" WHERE ((("_root.or.profile.base"."id") = ("profile_id")) AND (EXISTS (SELECT $15 FROM "public"."profiles" AS "__be_0_profiles" WHERE (((("__be_0_profiles"."id") = ("public"."profiles_files"."profile_id")) AND ($16)) AND (($17) AND ((((("__be_0_profiles"."group_id") = ((($1->>$18))::uuid)) OR ((("__be_0_profiles"."group_id") IS NULL) AND (((($1->>$19))::uuid) IS NULL))) AND ($20)) AND ($21)))) ))) ) AS "_root.or.profile.ar.profile.files.base" ) AS "_root.or.profile.ar.profile.files" ) AS "_root.or.profile.ar.profile.files" ON ($22) LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("associations" ), $23 ) AS "associations" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.profile.ar.profile.associations.base"."project_id" AS "projectId", "_root.or.profile.ar.profile.associations.base"."deleted_at" AS "deletedAt", $24 AS "__typename" ) AS "_e" ) ) AS "associations" FROM (SELECT * FROM "public"."profiles_associations" WHERE ((("_root.or.profile.base"."id") = ("profile_id")) AND (("public"."profiles_associations"."group_id") = ((($1->>$25))::uuid))) ) AS "_root.or.profile.ar.profile.associations.base" ) AS "_root.or.profile.ar.profile.associations" ) AS "_root.or.profile.ar.profile.associations" ON ($26) ) AS "_root.or.profile" ON ($27) LEFT OUTER JOIN LATERAL (SELECT (SELECT coalesce(json_agg("_sub_query"."files" ), $28 ) FROM (SELECT "_unnest_table"."files" AS "files" FROM UNNEST(array_agg("files" )) AS "_unnest_table"("files") LIMIT $29 ) AS "_sub_query" ) AS "files" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.files.base"."file_id" AS "fileId", $30 AS "__typename" ) AS "_e" ) ) AS "files" FROM (SELECT * FROM "public"."historyentries_files" WHERE ((("_root.base"."id") = ("historyentry_id")) AND (EXISTS (SELECT $31 FROM "public"."historyentries" AS "__be_0_historyentries" WHERE (((("__be_0_historyentries"."id") = ("public"."historyentries_files"."historyentry_id")) AND ($32)) AND (($33) AND ((((("__be_0_historyentries"."group_id") = ((($1->>$34))::uuid)) OR ((("__be_0_historyentries"."group_id") IS NULL) AND (((($1->>$35))::uuid) IS NULL))) AND ($36)) AND ($37)))) ))) ) AS "_root.ar.root.files.base" ) AS "_root.ar.root.files" ) AS "_root.ar.root.files" ON ($38) ) AS "_root"
|
|
59 min
0.3%
|
2 ms
|
1,922,364
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $5 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."created_at" AS "createdAt", "_root.base"."updated_at" AS "updatedAt", "_root.base"."user_id" AS "userId", "_root.base"."external_id" AS "externalId", "_root.base"."linkedin_seat_id" AS "linkedinSeatId", "_root.base"."last_event_at" AS "lastEventAt", "_root.base"."type" AS "type", "_root.base"."profile_member_id" AS "profileMemberId", "_root.base"."profile_talent_identifier" AS "profileTalentIdentifier", "_root.base"."profile_sales_navigator_identifier" AS "profileSalesNavigatorIdentifier", "_root.base"."trigger_profile_significant_identifier" AS "profileSignificantIdentifier", "_root.base"."email_address" AS "emailAddress", "_root.base"."oauth_account_id" AS "oauthAccountId", "public"."threads_last_fetched_at"("_root.base") AS "lastFetchedAt", "_root.ar.root.pendingTasks"."pendingTasks" AS "pendingTasks", $6 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."threads" WHERE ((("public"."threads"."user_id") = ((($1->>$7))::uuid)) AND ((("public"."threads"."user_id") = (($3)::uuid)) AND (("public"."threads"."id") = ANY(($4)::uuid[])))) LIMIT $8 ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT json_build_object($9, json_build_object($10, COUNT(*), $11, $12 ), $13, coalesce($14, (bool_or($15))::text ) ) AS "pendingTasks" FROM (SELECT $16 FROM (SELECT * FROM "public"."tasks" WHERE ((("_root.base"."external_id") = ("external_id")) AND (((("public"."tasks"."deleted_at") IS NULL) AND ((("public"."tasks"."group_id") = ((($1->>$17))::uuid)) OR ((("public"."tasks"."group_id") IS NULL) AND (((($1->>$18))::uuid) IS NULL)))) AND ((("public"."tasks"."deleted_at") IS NULL) AND (("public"."tasks"."status") = ANY(($2)::text[]))))) ) AS "_root.ar.root.pendingTasks.base" ) AS "_root.ar.root.pendingTasks" ) AS "_root.ar.root.pendingTasks" ON ($19) ) AS "_root"
|
|
58 min
0.3%
|
1 ms
|
3,832,229
nhost_hasura
|
WITH "_mra__api_usage" AS (INSERT INTO "public"."api_usage" ( "user_id", "query", "endpoint", "duration", "variables", "is_success", "error_code", "group_id" ) VALUES (($1)::uuid, ($2)::text, ($3)::text, ($4)::integer, ($5)::jsonb, ($6)::boolean, ($7)::text, ($8)::uuid) RETURNING * , ($9)::boolean AS "check__constraint"), "_aca__api_usage" AS (SELECT "id" , "group_id" , "user_id" , "created_at" , "duration" , "endpoint" , "is_success" , "query" , "variables" , "error_code" FROM "_mra__api_usage" ) SELECT (SELECT coalesce((json_agg("root" )->$10), $11 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", $12 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__api_usage" WHERE ($13) ) AS "_root.base" ) AS "_root" ) , (SELECT coalesce(bool_and("check__constraint" ), $14 ) FROM "_mra__api_usage" )
|
|
55 min
0.3%
|
5 ms
|
672,136
nhost_hasura
|
SELECT json_build_object($5, json_build_object($6, json_build_object($7, max("_root"."root.pg.done_at" ), $8, $9 ), $10, $11 ), $12, coalesce($13, (bool_or($14))::text ) ) AS "root" FROM (SELECT "_root.base"."done_at" AS "root.pg.done_at" FROM (SELECT * FROM "public"."tasks" WHERE (((("public"."tasks"."deleted_at") IS NULL) AND ((("public"."tasks"."group_id") = ((($1->>$15))::uuid)) OR ((("public"."tasks"."group_id") IS NULL) AND (((($1->>$16))::uuid) IS NULL)))) AND ((("public"."tasks"."type") = ANY(($2)::text[])) AND ((("public"."tasks"."status") = (($3)::text)) AND ((("public"."tasks"."deleted_at") IS NULL) AND (("public"."tasks"."user_id_or_group_id") = ANY(($4)::uuid[])))))) ) AS "_root.base" ) AS "_root"
|
|
54 min
0.3%
|
3 ms
|
926,119
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."created_at" AS "createdAt", "_root.base"."updated_at" AS "updatedAt", "_root.base"."user_id" AS "userId", "_root.base"."external_id" AS "externalId", "_root.base"."linkedin_seat_id" AS "linkedinSeatId", "_root.base"."last_event_at" AS "lastEventAt", "_root.base"."type" AS "type", "_root.base"."profile_member_id" AS "profileMemberId", "_root.base"."profile_talent_identifier" AS "profileTalentIdentifier", "_root.base"."profile_sales_navigator_identifier" AS "profileSalesNavigatorIdentifier", "_root.base"."trigger_profile_significant_identifier" AS "profileSignificantIdentifier", "_root.base"."email_address" AS "emailAddress", "_root.base"."oauth_account_id" AS "oauthAccountId", "public"."threads_last_fetched_at"("_root.base") AS "lastFetchedAt", "_root.ar.root.pendingTasks"."pendingTasks" AS "pendingTasks", $5 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."threads" WHERE ((("public"."threads"."user_id") = ((($1->>$6))::uuid)) AND (("public"."threads"."external_id") = ANY(($3)::text[]))) LIMIT $7 ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT json_build_object($8, json_build_object($9, COUNT(*), $10, $11 ), $12, coalesce($13, (bool_or($14))::text ) ) AS "pendingTasks" FROM (SELECT $15 FROM (SELECT * FROM "public"."tasks" WHERE ((("_root.base"."external_id") = ("external_id")) AND (((("public"."tasks"."deleted_at") IS NULL) AND ((("public"."tasks"."group_id") = ((($1->>$16))::uuid)) OR ((("public"."tasks"."group_id") IS NULL) AND (((($1->>$17))::uuid) IS NULL)))) AND ((("public"."tasks"."deleted_at") IS NULL) AND (("public"."tasks"."status") = ANY(($2)::text[]))))) ) AS "_root.ar.root.pendingTasks.base" ) AS "_root.ar.root.pendingTasks" ) AS "_root.ar.root.pendingTasks" ON ($18) ) AS "_root"
|
|
51 min
0.3%
|
2 ms
|
1,683,233
nhost_hasura
|
WITH "_mra__users_oauth" AS (UPDATE "public"."users_oauth" SET "is_connected" = ($1)::boolean,"data" = ($2)::jsonb WHERE ((("public"."users_oauth"."user_id") = (($3)::uuid)) AND (("public"."users_oauth"."id") = (($4)::uuid))) RETURNING * , (((("public"."users_oauth"."user_id") = (($5)::uuid)) AND ($6)) AND ($7))::boolean AS "check__constraint"), "_aca__users_oauth" AS (SELECT "user_id" , "type" , "expire_at" , "access_token" , "refresh_token" , "data" , "id" , "account_id" , "is_primary" , "is_connected" , "nylas_internal_account_id" , "migrated_from_v2_at" , "provider" , "has_access_to_emails" , "has_access_to_calendars" , "external_id" , "id_integer" , "trigger_short_id" , "access_token_expires_at" , "refresh_token_expires_at" , "has_access_to_sms" , "has_access_to_phone" , "ringcentral_main_number" , "updated_at" , "created_at" , "nylas_signature_id" , "signature_html" , "nylas_signature_synced_at" , "disconnected_at" , "apigami_user_ref" , "allow_messages_sync" , "allow_inmails_sync" FROM "_mra__users_oauth" ) SELECT (SELECT coalesce((json_agg("root" )->$8), $9 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", $10 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__users_oauth" WHERE ($11) ) AS "_root.base" ) AS "_root" ) , (SELECT coalesce(bool_and("check__constraint" ), $12 ) FROM "_mra__users_oauth" )
|
|
49 min
0.3%
|
1 ms
|
5,535,159
nhost_hasura
|
SELECT coalesce((json_agg("root" )->$3), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."display_name" AS "displayName", "_root.base"."disabled" AS "disabled", "_root.base"."email" AS "email", "_root.base"."phone_number" AS "phoneNumber", "_root.base"."locale" AS "locale", "_root.base"."created_at" AS "createdAt", "_root.base"."updated_at" AS "updatedAt", "_root.base"."last_seen" AS "lastSeen", "_root.ar.root.userProviders"."userProviders" AS "userProviders", "_root.or.renewPassword"."renewPassword" AS "renewPassword", "_root.or.rbacRole"."rbacRole" AS "rbacRole", "_root.or.group"."group" AS "group", "_root.ar.root.roles"."roles" AS "roles", "_root.ar.root.oauths"."oauths" AS "oauths", "_root.base"."metadata" AS "metadata", "_root.or.preferences"."preferences" AS "preferences", $5 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "auth"."users" WHERE (((EXISTS (SELECT $6 FROM "public"."users_groups" AS "__be_0_users_groups" WHERE (((("__be_0_users_groups"."user_id") = ("auth"."users"."id")) AND ($7)) AND (($8) AND (((("__be_0_users_groups"."group_id") = ((($1->>$9))::uuid)) AND ($10)) AND ($11)))) )) OR (("auth"."users"."id") = ((($1->>$12))::uuid))) AND (("auth"."users"."id") = (($2)::uuid))) ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.preferences.base"."timezone" AS "timezone", $13 AS "__typename" ) AS "_e" ) ) AS "preferences" FROM (SELECT * FROM "public"."users_preferences" WHERE ((("_root.base"."id") = ("id")) AND (EXISTS (SELECT $14 FROM "auth"."users" AS "__be_0_auth_users" WHERE (((("__be_0_auth_users"."id") = ("public"."users_preferences"."id")) AND ($15)) AND (($16) AND ((EXISTS (SELECT $17 FROM "public"."users_groups" AS "__be_1_users_groups" WHERE (((("__be_1_users_groups"."user_id") = ("__be_0_auth_users"."id")) AND ($18)) AND (($19) AND (((("__be_1_users_groups"."group_id") = ((($1->>$20))::uuid)) AND ($21)) AND ($22)))) )) AND ($23)))) ))) LIMIT $24 ) AS "_root.or.preferences.base" ) AS "_root.or.preferences" ON ($25) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.renewPassword.base"."is_change_mandatory" AS "isChangeMandatory", "_root.or.renewPassword.base"."is_change_mandatory_at" AS "isChangeMandatoryAt", $26 AS "__typename" ) AS "_e" ) ) AS "renewPassword" FROM (SELECT * FROM "public"."users_renew_passwords_view" WHERE ((("_root.base"."id") = ("user_id")) AND ((("public"."users_renew_passwords_view"."user_id") = ((($1->>$27))::uuid)) OR ((("public"."users_renew_passwords_view"."user_id") IS NULL) AND (((($1->>$28))::uuid) IS NULL)))) LIMIT $29 ) AS "_root.or.renewPassword.base" ) AS "_root.or.renewPassword" ON ($30) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.group.base"."group_id" AS "groupId", "_root.or.group.or.group"."group" AS "group", $31 AS "__typename" ) AS "_e" ) ) AS "group" FROM (SELECT * FROM "public"."users_groups" WHERE ((("_root.base"."id") = ("user_id")) AND ((("public"."users_groups"."user_id") = ((($1->>$32))::uuid)) OR (("public"."users_groups"."group_id") = ((($1->>$33))::uuid)))) LIMIT $34 ) AS "_root.or.group.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.group.or.group.base"."id" AS "id", "_root.or.group.or.group.base"."name" AS "name", "_root.or.group.or.group.base"."timezone" AS "timezone", "_root.or.group.or.group.base"."locale" AS "locale", "_root.or.group.or.group.base"."data" AS "data", "_root.or.group.or.group.base"."subscription_ids" AS "subscriptionIds", "_root.or.group.or.group.base"."created_by_user_id" AS "createdByUserId", "_root.or.group.or.group.ar.group.featureToggles"."featureToggles" AS "featureToggles", "_root.or.group.or.group.ar.group.groupVariables"."groupVariables" AS "groupVariables", "_root.or.group.or.group.ar.group.salesCustomers"."salesCustomers" AS "salesCustomers", $35 AS "__typename" ) AS "_e" ) ) AS "group" FROM (SELECT * FROM "public"."groups" WHERE ((("_root.or.group.base"."group_id") = ("id")) AND (("public"."groups"."id") = ((($1->>$36))::uuid))) LIMIT $37 ) AS "_root.or.group.or.group.base" LEFT OUTER JOIN LATERAL (SELECT (SELECT coalesce(json_agg("_sub_query"."salesCustomers" ), $38 ) FROM (SELECT "_unnest_table"."salesCustomers" AS "salesCustomers" FROM UNNEST(array_agg("salesCustomers" )) AS "_unnest_table"("salesCustomers") LIMIT $39 ) AS "_sub_query" ) AS "salesCustomers" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.group.or.group.ar.group.salesCustomers.base"."id" AS "id", $40 AS "__typename" ) AS "_e" ) ) AS "salesCustomers" FROM (SELECT * FROM "public"."sales_customers" WHERE ((("_root.or.group.or.group.base"."id") = ("group_id")) AND ((("public"."sales_customers"."group_id") = ((($1->>$41))::uuid)) OR ((("public"."sales_customers"."group_id") IS NULL) AND (((($1->>$42))::uuid) IS NULL)))) ) AS "_root.or.group.or.group.ar.group.salesCustomers.base" ) AS "_root.or.group.or.group.ar.group.salesCustomers" ) AS "_root.or.group.or.group.ar.group.salesCustomers" ON ($43) LEFT OUTER JOIN LATERAL (SELECT (SELECT coalesce(json_agg("_sub_query"."groupVariables" ), $44 ) FROM (SELECT "_unnest_table"."groupVariables" AS "groupVariables" FROM UNNEST(array_agg("groupVariables" )) AS "_unnest_table"("groupVariables") LIMIT $45 ) AS "_sub_query" ) AS "groupVariables" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.group.or.group.ar.group.groupVariables.base"."id" AS "id", "_root.or.group.or.group.ar.group.groupVariables.base"."group_id" AS "groupId", "_root.or.group.or.group.ar.group.groupVariables.base"."created_at" AS "createdAt", "_root.or.group.or.group.ar.group.groupVariables.base"."updated_at" AS "updatedAt", "_root.or.group.or.group.ar.group.groupVariables.base"."name" AS "name", "md5_b3f8fe4e3f7787862b7acb1ea1e5a95a__root.or.group.or.group.ar.group.groupVariables.ar.groupVariables.usersVariables"."usersVariables" AS "usersVariables", $46 AS "__typename" ) AS "_e" ) ) AS "groupVariables" FROM (SELECT * FROM "public"."groups_variables_names" WHERE ((("_root.or.group.or.group.base"."id") = ("group_id")) AND (("public"."groups_variables_names"."group_id") = ((($1->>$47))::uuid))) ) AS "_root.or.group.or.group.ar.group.groupVariables.base" LEFT OUTER JOIN LATERAL (SELECT (SELECT coalesce(json_agg("_sub_query"."usersVariables" ), $48 ) FROM (SELECT "_unnest_table"."usersVariables" AS "usersVariables" FROM UNNEST(array_agg("usersVariables" )) AS "_unnest_table"("usersVariables") LIMIT $49 ) AS "_sub_query" ) AS "usersVariables" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "md5_d3085c3af421168d4b196e1f23777275__root.or.group.or.group.ar.group.groupVariables.ar.groupVariables.usersVariables.base"."id" AS "id", "md5_d3085c3af421168d4b196e1f23777275__root.or.group.or.group.ar.group.groupVariables.ar.groupVariables.usersVariables.base"."user_id" AS "userId", "md5_d3085c3af421168d4b196e1f23777275__root.or.group.or.group.ar.group.groupVariables.ar.groupVariables.usersVariables.base"."html_content" AS "htmlContent", "md5_d3085c3af421168d4b196e1f23777275__root.or.group.or.group.ar.group.groupVariables.ar.groupVariables.usersVariables.base"."text_content" AS "textContent", $50 AS "__typename" ) AS "_e" ) ) AS "usersVariables" FROM (SELECT * FROM "public"."users_variables" WHERE ((("_root.or.group.or.group.ar.group.groupVariables.base"."id") = ("group_variable_name_id")) AND (("public"."users_variables"."user_id") = ((($1->>$51))::uuid))) ) AS "md5_d3085c3af421168d4b196e1f23777275__root.or.group.or.group.ar.group.groupVariables.ar.groupVariables.usersVariables.base" ) AS "md5_b3f8fe4e3f7787862b7acb1ea1e5a95a__root.or.group.or.group.ar.group.groupVariables.ar.groupVariables.usersVariables" ) AS "md5_b3f8fe4e3f7787862b7acb1ea1e5a95a__root.or.group.or.group.ar.group.groupVariables.ar.groupVariables.usersVariables" ON ($52) ) AS "_root.or.group.or.group.ar.group.groupVariables" ) AS "_root.or.group.or.group.ar.group.groupVariables" ON ($53) LEFT OUTER JOIN LATERAL (SELECT (SELECT coalesce(json_agg("_sub_query"."featureToggles" ), $54 ) FROM (SELECT "_unnest_table"."featureToggles" AS "featureToggles" FROM UNNEST(array_agg("featureToggles" )) AS "_unnest_table"("featureToggles") LIMIT $55 ) AS "_sub_query" ) AS "featureToggles" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.group.or.group.ar.group.featureToggles.base"."feature_id" AS "featureId", "_root.or.group.or.group.ar.group.featureToggles.base"."disabled_at" AS "disabledAt", "_root.or.group.or.group.ar.group.featureToggles.base"."data" AS "data", $56 AS "__typename" ) AS "_e" ) ) AS "featureToggles" FROM (SELECT * FROM "public"."groups_feature_toggles" WHERE ((("_root.or.group.or.group.base"."id") = ("group_id")) AND ((("public"."groups_feature_toggles"."group_id") = ((($1->>$57))::uuid)) AND (("public"."groups_feature_toggles"."disabled_at") IS NULL))) ) AS "_root.or.group.or.group.ar.group.featureToggles.base" ) AS "_root.or.group.or.group.ar.group.featureToggles" ) AS "_root.or.group.or.group.ar.group.featureToggles" ON ($58) ) AS "_root.or.group.or.group" ON ($59) ) AS "_root.or.group" ON ($60) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.rbacRole.or.role"."role" AS "role", $61 AS "__typename" ) AS "_e" ) ) AS "rbacRole" FROM (SELECT * FROM "public"."rbac_users_roles" WHERE ((("_root.base"."id") = ("user_id")) AND (EXISTS (SELECT $62 FROM "auth"."users" AS "__be_0_auth_users" WHERE (((("__be_0_auth_users"."id") = ("public"."rbac_users_roles"."user_id")) AND ($63)) AND (($64) AND ((EXISTS (SELECT $65 FROM "public
|
|
40 min
0.2%
|
46 ms
|
52,408
nhost_hasura
|
SELECT coalesce(json_agg("root" ORDER BY "root.pg.enabled_at" DESC NULLS FIRST), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."enabled_at" AS "enabledAt", "_root.or.project"."project" AS "project", $4 AS "__typename" ) AS "_e" ) ) AS "root", "_root.base"."enabled_at" AS "root.pg.enabled_at" FROM (SELECT * FROM "public"."projects_jobboards" WHERE ((EXISTS (SELECT $5 FROM "public"."projects" AS "__be_0_projects" WHERE (((("__be_0_projects"."id") = ("public"."projects_jobboards"."project_id")) AND ($6)) AND (($7) AND ((((("__be_0_projects"."group_id") = ((($1->>$8))::uuid)) OR ((("__be_0_projects"."group_id") IS NULL) AND (((($1->>$9))::uuid) IS NULL))) AND ($10)) AND ($11)))) )) AND ((("public"."projects_jobboards"."jobboard_id") = (($2)::uuid)) AND ((EXISTS (SELECT $12 FROM "public"."projects" AS "__be_1_projects" WHERE (((("__be_1_projects"."id") = ("public"."projects_jobboards"."project_id")) AND ($13)) AND (((((("__be_1_projects"."group_id") = ((($1->>$14))::uuid)) OR ((("__be_1_projects"."group_id") IS NULL) AND (((($1->>$15))::uuid) IS NULL))) AND ($16)) AND ($17)) AND (((((("__be_1_projects"."deleted_at") IS NULL) AND ($18)) AND ($19)) AND (($20) AND ($21))) AND ($22)))) )) AND (("public"."projects_jobboards"."enabled_at") IS NOT NULL)))) ORDER BY "enabled_at" DESC NULLS FIRST LIMIT $23 OFFSET $24) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.project.base"."id" AS "id", "_root.or.project.base"."created_at" AS "createdAt", "_root.or.project.base"."updated_at" AS "updatedAt", "_root.or.project.base"."external_id" AS "externalId", "_root.or.project.base"."reference_id" AS "referenceId", "_root.or.project.base"."trigger_short_id" AS "shortId", "_root.or.project.base"."name" AS "name", "_root.or.project.ar.project.fieldsValues"."fieldsValues" AS "fieldsValues", "_root.or.project.ar.project.assignees"."assignees" AS "assignees", $25 AS "__typename" ) AS "_e" ) ) AS "project" FROM (SELECT * FROM "public"."projects" WHERE ((("_root.base"."project_id") = ("id")) AND ((("public"."projects"."group_id") = ((($1->>$26))::uuid)) OR ((("public"."projects"."group_id") IS NULL) AND (((($1->>$27))::uuid) IS NULL)))) LIMIT $28 ) AS "_root.or.project.base" LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("assignees" ), $29 ) AS "assignees" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.project.ar.project.assignees.base"."id" AS "id", "_root.or.project.ar.project.assignees.or.user"."user" AS "user", $30 AS "__typename" ) AS "_e" ) ) AS "assignees" FROM (SELECT * FROM "public"."projects_assignees" WHERE ((("_root.or.project.base"."id") = ("project_id")) AND (("public"."projects_assignees"."deleted_at") IS NULL)) ) AS "_root.or.project.ar.project.assignees.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.project.ar.project.assignees.or.user.base"."display_name" AS "displayName", "_root.or.project.ar.project.assignees.or.user.base"."email" AS "email", "_root.or.project.ar.project.assignees.or.user.base"."id" AS "id", $31 AS "__typename" ) AS "_e" ) ) AS "user" FROM (SELECT * FROM "auth"."users" WHERE ((("_root.or.project.ar.project.assignees.base"."user_id") = ("id")) AND ((EXISTS (SELECT $32 FROM "public"."users_groups" AS "__be_0_users_groups" WHERE (((("__be_0_users_groups"."user_id") = ("auth"."users"."id")) AND ($33)) AND (($34) AND (((("__be_0_users_groups"."group_id") = ((($1->>$35))::uuid)) AND ($36)) AND ($37)))) )) OR (("auth"."users"."id") = ((($1->>$38))::uuid)))) LIMIT $39 ) AS "_root.or.project.ar.project.assignees.or.user.base" ) AS "_root.or.project.ar.project.assignees.or.user" ON ($40) ) AS "_root.or.project.ar.project.assignees" ) AS "_root.or.project.ar.project.assignees" ON ($41) LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("fieldsValues" ), $42 ) AS "fieldsValues" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.project.ar.project.fieldsValues.base"."id" AS "id", "_root.or.project.ar.project.fieldsValues.or.field"."field" AS "field", "_root.or.project.ar.project.fieldsValues.or.fieldValue"."fieldValue" AS "fieldValue", "_root.or.project.ar.project.fieldsValues.or.location"."location" AS "location", "_root.or.project.ar.project.fieldsValues.base"."value" AS "value", $43 AS "__typename" ) AS "_e" ) ) AS "fieldsValues" FROM (SELECT * FROM "public"."projects_fieldsvalues" WHERE ((("_root.or.project.base"."id") = ("project_id")) AND ((("public"."projects_fieldsvalues"."group_id") = ((($1->>$44))::uuid)) AND ((("public"."projects_fieldsvalues"."deleted_at") IS NULL) AND (((("public"."projects_fieldsvalues"."fieldvalue_id") IS NULL) OR (EXISTS (SELECT $45 FROM "public"."fieldsvalues" AS "__be_0_fieldsvalues" WHERE (((("__be_0_fieldsvalues"."id") = ("public"."projects_fieldsvalues"."fieldvalue_id")) AND ($46)) AND (($47) AND (((("__be_0_fieldsvalues"."deleted_at") IS NULL) AND ($48)) AND ($49)))) ))) AND (EXISTS (SELECT $50 FROM "public"."fields" AS "__be_1_fields" WHERE (((("__be_1_fields"."id") = ("public"."projects_fieldsvalues"."field_id")) AND ($51)) AND (((((("__be_1_fields"."group_id") = ((($1->>$52))::uuid)) OR ((("__be_1_fields"."group_id") IS NULL) AND (((($1->>$53))::uuid) IS NULL))) AND ($54)) AND ($55)) AND (((("__be_1_fields"."deleted_at") IS NULL) AND ($56)) AND ($57)))) )))))) ) AS "_root.or.project.ar.project.fieldsValues.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.project.ar.project.fieldsValues.or.fieldValue.base"."id" AS "id", "_root.or.project.ar.project.fieldsValues.or.fieldValue.base"."name" AS "name", "_root.or.project.ar.project.fieldsValues.or.fieldValue.base"."technical_value" AS "technicalValue", $58 AS "__typename" ) AS "_e" ) ) AS "fieldValue" FROM (SELECT * FROM "public"."fieldsvalues" WHERE (("_root.or.project.ar.project.fieldsValues.base"."fieldvalue_id") = ("id")) LIMIT $59 ) AS "_root.or.project.ar.project.fieldsValues.or.fieldValue.base" ) AS "_root.or.project.ar.project.fieldsValues.or.fieldValue" ON ($60) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.project.ar.project.fieldsValues.or.location.base"."id" AS "id", "_root.or.project.ar.project.fieldsValues.or.location.base"."search" AS "search", "_root.or.project.ar.project.fieldsValues.or.location.base"."locality" AS "locality", "_root.or.project.ar.project.fieldsValues.or.location.base"."postal_code" AS "postalCode", "_root.or.project.ar.project.fieldsValues.or.location.base"."administrative_area_level_2" AS "administrativeAreaLevel2", "_root.or.project.ar.project.fieldsValues.or.location.base"."administrative_area_level_1" AS "administrativeAreaLevel1", "_root.or.project.ar.project.fieldsValues.or.location.base"."country_name" AS "countryName", "_root.or.project.ar.project.fieldsValues.or.location.base"."country_short_name" AS "countryShortName", "_root.or.project.ar.project.fieldsValues.or.location.base"."formatted_address" AS "formattedAddress", $61 AS "__typename" ) AS "_e" ) ) AS "location" FROM (SELECT * FROM "public"."locations" WHERE (("_root.or.project.ar.project.fieldsValues.base"."location_id") = ("id")) LIMIT $62 ) AS "_root.or.project.ar.project.fieldsValues.or.location.base" ) AS "_root.or.project.ar.project.fieldsValues.or.location" ON ($63) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.project.ar.project.fieldsValues.or.field.base"."id" AS "id", "_root.or.project.ar.project.fieldsValues.or.field.base"."type" AS "type", "_root.or.project.ar.project.fieldsValues.or.field.base"."name" AS "name", "_root.or.project.ar.project.fieldsValues.or.field.base"."purpose" AS "purpose", "_root.or.project.ar.project.fieldsValues.or.field.base"."is_public" AS "isPublic", "_root.or.project.ar.project.fieldsValues.or.field.base"."order" AS "order", $64 AS "__typename" ) AS "_e" ) ) AS "field" FROM (SELECT * FROM "public"."fields" WHERE ((("_root.or.project.ar.project.fieldsValues.base"."field_id") = ("id")) AND ((("public"."fields"."group_id") = ((($1->>$65))::uuid)) OR ((("public"."fields"."group_id") IS NULL) AND (((($1->>$66))::uuid) IS NULL)))) LIMIT $67 ) AS "_root.or.project.ar.project.fieldsValues.or.field.base" ) AS "_root.or.project.ar.project.fieldsValues.or.field" ON ($68) ) AS "_root.or.project.ar.project.fieldsValues" ) AS "_root.or.project.ar.project.fieldsValues" ON ($69) ) AS "_root.or.project" ON ($70) ORDER BY "root.pg.enabled_at" DESC NULLS FIRST ) AS "_root"
|
|
39 min
0.2%
|
5 ms
|
439,398
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."context_is_valid" AS "contextIsValid", "_root.base"."created_at" AS "createdAt", "_root.base"."generated_at" AS "generatedAt", "_root.base"."generated_by_user_id" AS "generatedByUserId", "_root.base"."group_id" AS "groupId", "_root.base"."id" AS "id", "_root.base"."is_stale" AS "isStale", "_root.base"."profile_id" AS "profileId", "_root.base"."profile_is_valid" AS "profileIsValid", "_root.base"."project_id" AS "projectId", "_root.base"."score" AS "score", "_root.base"."search_history_id" AS "searchHistoryId", "_root.base"."should_exclude_from_generation" AS "shouldExcludeFromGeneration", "_root.base"."skipped" AS "skipped", "_root.base"."status" AS "status", "_root.base"."summary" AS "summary", $4 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."profiles_ratings_status_view" WHERE (((("public"."profiles_ratings_status_view"."group_id") = ((($1->>$5))::uuid)) OR ((("public"."profiles_ratings_status_view"."group_id") IS NULL) AND (((($1->>$6))::uuid) IS NULL))) AND (("public"."profiles_ratings_status_view"."id") = ANY(($2)::text[]))) ) AS "_root.base" ) AS "_root"
|
|
35 min
0.2%
|
2 ms
|
1,376,610
nhost_hasura
|
-- name: RefreshTokenAndGetUserRoles :many
WITH refreshed_token AS (
UPDATE auth.refresh_tokens
SET
expires_at = $2,
refresh_token_hash = $1
WHERE refresh_token_hash = $3
RETURNING id AS refresh_token_id, user_id
),
updated_user AS (
UPDATE auth.users
SET last_seen = now()
FROM refreshed_token
WHERE auth.users.id = refreshed_token.user_id
)
SELECT refreshed_token.refresh_token_id, role FROM auth.user_roles
RIGHT JOIN refreshed_token ON auth.user_roles.user_id = refreshed_token.user_id
|
|
34 min
0.2%
|
0 ms
|
16,519,098
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."data" AS "data", "_root.base"."type" AS "type", "_root.base"."refresh_token" AS "refreshToken", "_root.base"."expire_at" AS "expireAt", "_root.base"."access_token_expires_at" AS "accessTokenExpiresAt", "_root.base"."refresh_token_expires_at" AS "refreshTokenExpiresAt", "_root.base"."user_id" AS "userId", "_root.base"."access_token" AS "accessToken", "_root.base"."account_id" AS "accountId", "_root.base"."is_primary" AS "isPrimary", "_root.base"."is_connected" AS "isConnected", "_root.base"."disconnected_at" AS "disconnectedAt", "_root.base"."external_id" AS "externalId", "_root.base"."provider" AS "provider", "_root.base"."trigger_short_id" AS "shortId", "_root.base"."has_access_to_emails" AS "hasAccessToEmails", "_root.base"."has_access_to_calendars" AS "hasAccessToCalendars", "_root.base"."has_access_to_sms" AS "hasAccessToSms", "_root.base"."has_access_to_phone" AS "hasAccessToPhone", "_root.base"."allow_messages_sync" AS "allowMessagesSync", "_root.base"."allow_inmails_sync" AS "allowInmailsSync", "_root.base"."nylas_signature_id" AS "nylasSignatureId", "_root.base"."nylas_signature_synced_at" AS "nylasSignatureSyncedAt", "_root.base"."ringcentral_main_number" AS "ringcentralMainNumber", "_root.or.user"."user" AS "user", $4 AS "__typename", "_root.base"."apigami_user_ref" AS "apigamiUserRef" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."users_oauth" WHERE ((("public"."users_oauth"."user_id") = ((($1->>$5))::uuid)) AND (("public"."users_oauth"."user_id") = (($2)::uuid))) LIMIT $6 ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.user.base"."display_name" AS "displayName", "_root.or.user.base"."avatar_url" AS "avatarUrl", $7 AS "__typename" ) AS "_e" ) ) AS "user" FROM (SELECT * FROM "auth"."users" WHERE ((("_root.base"."user_id") = ("id")) AND ((EXISTS (SELECT $8 FROM "public"."users_groups" AS "__be_0_users_groups" WHERE (((("__be_0_users_groups"."user_id") = ("auth"."users"."id")) AND ($9)) AND (($10) AND (((("__be_0_users_groups"."group_id") = ((($1->>$11))::uuid)) AND ($12)) AND ($13)))) )) OR (("auth"."users"."id") = ((($1->>$14))::uuid)))) LIMIT $15 ) AS "_root.or.user.base" ) AS "_root.or.user" ON ($16) ) AS "_root"
|
|
33 min
0.2%
|
0 ms
|
241,526,755
nhost_hasura
|
BEGIN ISOLATION LEVEL READ COMMITTED READ WRITE
|
|
32 min
0.2%
|
38 ms
|
51,663
nhost_hasura
|
WITH "_cte_notifications_count_0" AS (SELECT
($2)::uuid::uuid as "groupId",
($3)::uuid::uuid as "userId",
LEAST($11, COALESCE((
SELECT COUNT(*)
FROM (
SELECT $12
FROM notifications n
INNER JOIN historyentries h ON h.id = n.historyentry_id AND h.deleted_at IS NULL AND h.type = $13
WHERE n.deleted_at IS NULL
AND n.type = $14
AND n.read_at IS NULL
AND n.group_id = ($4)::uuid::uuid
AND (
-- Direct notifications to user with project_id IS NULL
(
n.user_id = ($5)::uuid::uuid
AND h.project_id IS NULL
)
OR ( -- project is assigned to the user and is not deleted
EXISTS (
SELECT $15
FROM projects_assignees pa
WHERE pa.project_id = h.project_id
AND pa.deleted_at IS NULL
AND pa.user_id = ($6)::uuid::uuid
)
AND NOT EXISTS (
SELECT $16
FROM projects pj
WHERE pj.id = h.project_id
AND pj.deleted_at IS NOT NULL
)
)
)
AND NOT EXISTS (
SELECT $17
FROM profiles p
WHERE p.id = n.profile_id
AND p.deleted_at IS NOT NULL
)
LIMIT $18
) sub1
), $19)) as "jobApplicationsNotificationsCount",
-- Messages count (limité à 100) - Version ultra-optimisée
LEAST($20, COALESCE((
SELECT COUNT(*)
FROM (
SELECT $21
FROM notifications n
WHERE n.deleted_at IS NULL
AND n.type = $22
AND n.read_at IS NULL
AND n.user_id = ($7)::uuid::uuid
AND NOT EXISTS (
SELECT $23
FROM profiles p
WHERE p.id = n.profile_id
AND p.deleted_at IS NOT NULL
)
AND NOT EXISTS (
SELECT $24
FROM historyentries h
WHERE h.id = n.historyentry_id
AND h.deleted_at IS NOT NULL
)
AND NOT EXISTS (
SELECT $25
FROM historyentries h
WHERE h.id = n.historyentry_id
AND h.trigger_is_confidentiality_forced
)
LIMIT $26
) sub3
), $27)) as "messagesNotificationsCount",
-- Todos count (limité à 100) - Version ultra-optimisée
LEAST($28, COALESCE((
SELECT COUNT(*)
FROM (
SELECT DISTINCT t.id
FROM todos t
WHERE t.group_id = ($8)::uuid::uuid
AND t.deleted_at IS NULL
AND t.done_at IS NULL
AND (t.scheduled_at IS NULL OR t.scheduled_at <= NOW())
AND (
-- User owns the todo and no specific assignment
(t.owned_by_user_id = ($9)::uuid::uuid AND NOT EXISTS (
SELECT $29 FROM mentions m WHERE m.source_id = t.id AND m.source_type = $30 AND m.target_type = $31 AND m.deleted_at IS NULL
))
OR
-- User is specifically assigned
EXISTS (
SELECT $32 FROM mentions m WHERE m.source_id = t.id AND m.source_type = $33 AND m.target_type = $34 AND m.target_id = ($10)::uuid::uuid AND m.deleted_at IS NULL
)
)
AND (
-- Mention no profiles at all
NOT EXISTS (
SELECT $35 FROM mentions m WHERE m.source_id = t.id AND m.source_type = $36 AND m.target_type = $37
)
OR
-- Or at least one profile mention exists with non-deleted profile
-- Cause we do not want to show todos for deleted profiles only
EXISTS (
SELECT $38 FROM mentions m
INNER JOIN profiles p ON p.id = m.target_id
WHERE m.source_id = t.id AND m.source_type = $39 AND m.target_type = $40 AND m.deleted_at IS NULL AND p.deleted_at IS NULL
)
)
LIMIT $41
) sub4
), $42)) as "todosCount"
) SELECT coalesce(json_agg("root" ), $43 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."groupId" AS "groupId", "_root.base"."userId" AS "userId", "_root.base"."jobApplicationsNotificationsCount" AS "jobApplicationsNotificationsCount", "_root.base"."messagesNotificationsCount" AS "messagesNotificationsCount", "_root.base"."todosCount" AS "todosCount", $44 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_cte_notifications_count_0" WHERE ((("_cte_notifications_count_0"."groupId") = ((($1->>$45))::uuid)) AND (("_cte_notifications_count_0"."userId") = ((($1->>$46))::uuid))) ) AS "_root.base" ) AS "_root"
|
|
32 min
0.2%
|
0 ms
|
5,302,138
nhost_hasura
|
WITH "_mra__users_states" AS (UPDATE "public"."users_states" SET "extension_version" = ($1)::text,"extension_is_connected_at" = ($2)::timestamptz WHERE ((("public"."users_states"."user_id") = (($3)::uuid)) AND (("public"."users_states"."user_id") = (($4)::uuid))) RETURNING * , (((("public"."users_states"."user_id") = (($5)::uuid)) AND ($6)) AND ($7))::boolean AS "check__constraint"), "_aca__users_states" AS (SELECT "user_id" , "connected_linkedin_profile" , "extension_is_connected_to_linkedin_at" , "extension_is_connected_to_linkedin_recruiter_at" , "current_linkedin_recruiter_seat_id" , "extension_is_handling_tasks_at" , "pwa_is_opened_at" , "extension_is_connected_at" , "linkedin_invitations_sent_quota_reached_at" , "extension_version" , "extension_is_connected_to_linkedin_sales_navigator_at" , "current_linkedin_sales_navigator_seat_id" , "linkedin_inmails_credits_empty_at" , "linkedin_inmails_open_profiles_limit_reached_at" , "current_linkedin_regular_seat_id" FROM "_mra__users_states" ) SELECT json_build_object($8, (SELECT COUNT(*) FROM "_aca__users_states" ) ) , (SELECT coalesce(bool_and("check__constraint" ), $9 ) FROM "_mra__users_states" )
|
|
28 min
0.2%
|
3 ms
|
609,444
nhost_hasura
|
WITH "_mra__threads" AS (INSERT INTO "public"."threads" ( "user_id", "last_event_at", "email_address", "type", "oauth_account_id", "external_id" ) VALUES (($1)::uuid, ($2)::timestamptz, ($3)::text, ($4)::text, ($5)::text, ($6)::text) ON CONFLICT ON CONSTRAINT "threads_user_id_external_id_trigger_profile_significant_identif" DO UPDATE SET "profile_member_id" = EXCLUDED."profile_member_id","last_event_at" = EXCLUDED."last_event_at","email_address" = EXCLUDED."email_address","linkedin_seat_id" = EXCLUDED."linkedin_seat_id","type" = EXCLUDED."type","oauth_account_id" = EXCLUDED."oauth_account_id","profile_talent_identifier" = EXCLUDED."profile_talent_identifier","profile_sales_navigator_identifier" = EXCLUDED."profile_sales_navigator_identifier" WHERE ((((("public"."threads"."user_id") = (($7)::uuid)) AND ($8)) AND ($9)) AND ($10)) RETURNING * , CASE WHEN ("public"."threads"."xmax") = ($11) THEN ($12)::boolean ELSE (((("public"."threads"."user_id") = (($13)::uuid)) AND ($14)) AND ($15))::boolean END AS "check__constraint"), "_aca__threads" AS (SELECT "id" , "created_at" , "updated_at" , "user_id" , "external_id" , "linkedin_seat_id" , "last_event_at" , "type" , "profile_linkedin_id" , "profile_talent_identifier" , "profile_sales_navigator_identifier" , "trigger_profile_significant_identifier" , "profile_member_id" , "email_address" , "oauth_account_id" , "canonical_phone_number" FROM "_mra__threads" ) SELECT json_build_object($16, (SELECT coalesce(json_agg("root" ), $17 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", $18 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__threads" WHERE ($19) ) AS "_root.base" ) AS "_root" ), $20, $21 ) , (SELECT coalesce(bool_and("check__constraint" ), $22 ) FROM "_mra__threads" )
|
|
28 min
0.2%
|
0 ms
|
35,407,642
nhost_hasura
|
UPDATE hdb_catalog.event_log
SET tries = tries + $2
WHERE id = $1
|
|
28 min
0.2%
|
0 ms
|
8,527,167
nhost_hasura
|
WITH "_mra__quotas_usage" AS (INSERT INTO "public"."quotas_usage" ( "user_id", "type", "date", "used" ) VALUES (($1)::uuid, ($2)::text, ($3)::date, ($4)::numeric) ON CONFLICT ON CONSTRAINT "qutoas_usage_pkey" DO NOTHING RETURNING * , CASE WHEN ("public"."quotas_usage"."xmax") = ($5) THEN (((("public"."quotas_usage"."user_id") = (($6)::uuid)) AND ($7)) AND ($8))::boolean ELSE (((("public"."quotas_usage"."user_id") = (($9)::uuid)) AND ($10)) AND ($11))::boolean END AS "check__constraint"), "_aca__quotas_usage" AS (SELECT "user_id" , "type" , "used" , "date" FROM "_mra__quotas_usage" ) SELECT (SELECT coalesce((json_agg("root" )->$12), $13 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."used" AS "used", $14 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__quotas_usage" WHERE ($15) ) AS "_root.base" ) AS "_root" ) , (SELECT coalesce(bool_and("check__constraint" ), $16 ) FROM "_mra__quotas_usage" )
|
|
26 min
0.2%
|
7 ms
|
216,977
nhost_hasura
|
WITH "_mra__profiles_locations" AS (INSERT INTO "public"."profiles_locations" ( "deleted_at", "location_id", "source", "profile_id", "group_id" ) VALUES (($1)::timestamptz, ($2)::uuid, ($3)::text, $4, ($5)::uuid) ON CONFLICT ON CONSTRAINT "profiles_locations_profile_id_location_id_key" DO UPDATE SET "deleted_at" = EXCLUDED."deleted_at","group_id" = ($6)::uuid WHERE ((((("public"."profiles_locations"."group_id") = (($7)::uuid)) AND ($8)) AND ($9)) AND ($10)) RETURNING * , CASE WHEN ("public"."profiles_locations"."xmax") = ($11) THEN ((EXISTS (SELECT $12 FROM "public"."profiles" AS "_be_0_profiles" WHERE (((("_be_0_profiles"."id") = ("public"."profiles_locations"."profile_id")) AND ($13)) AND (($14) AND ((((("_be_0_profiles"."group_id") = (($15)::uuid)) OR ((("_be_0_profiles"."group_id") IS NULL) AND ((($16)::uuid) IS NULL))) AND ($17)) AND ($18)))) )) AND ($19))::boolean ELSE (((("public"."profiles_locations"."group_id") = (($20)::uuid)) AND ($21)) AND ($22))::boolean END AS "check__constraint"), "_aca__profiles_locations" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "profile_id" , "group_id" , "location_id" , "center" , "source" , "ai_run_id" FROM "_mra__profiles_locations" ) SELECT json_build_object($23, (SELECT COUNT(*) FROM "_aca__profiles_locations" ) ) , (SELECT coalesce(bool_and("check__constraint" ), $24 ) FROM "_mra__profiles_locations" )
|
|
25 min
0.1%
|
2 ms
|
650,318
nhost_hasura
|
WITH "_mra__tasks" AS (INSERT INTO "public"."tasks" ( "user_id", "status", "type", "priority", "parameters", "profile_id", "group_id" ) VALUES (($1)::uuid, ($2)::text, ($3)::text, ($4)::numeric, ($5)::jsonb, ($6)::uuid, ($7)::uuid) RETURNING * , ($8)::boolean AS "check__constraint"), "_aca__tasks" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "type" , "status" , "parameters" , "return" , "user_id" , "retries" , "group_id" , "done_at" , "priority" , "return_status_code" , "profile_id" , "project_id" , "email_address" , "message_scheduled_id" , "linkedin_seat_id" , "file_id" , "external_id" , "oauth_account_id" , "version" , "since" , "duration" , "user_id_or_group_id" , "historyentry_id" , "phone_number_provider_id" , "retry_at" , "trigger_id" , "trigger_worker_type" , "recording_id" , "resume_when" , "skip_extension_queue_and_execute_immediately" , "cancel_at" , "dashboard_id" FROM "_mra__tasks" ) SELECT (SELECT coalesce((json_agg("root" )->$9), $10 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."status" AS "status", "_root.base"."type" AS "type", "_root.base"."profile_id" AS "profileId", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", $11 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__tasks" WHERE ($12) ) AS "_root.base" ) AS "_root" ) , (SELECT coalesce(bool_and("check__constraint" ), $13 ) FROM "_mra__tasks" )
|
|
23 min
0.1%
|
2 ms
|
645,999
nhost_hasura
|
WITH "_mra__storage_files" AS (UPDATE "storage"."files" SET "bucket_id" = ($1)::text,"size" = ($2)::integer,"is_uploaded" = ($3)::boolean,"name" = ($4)::text,"mime_type" = ($5)::text,"etag" = ($6)::text WHERE (("storage"."files"."id") = (($7)::uuid)) RETURNING * , ($8)::boolean AS "check__constraint"), "_aca__storage_files" AS (SELECT "id" , "created_at" , "updated_at" , "bucket_id" , "name" , "size" , "mime_type" , "etag" , "is_uploaded" , "uploaded_by_user_id" , "metadata" FROM "_mra__storage_files" ) SELECT (SELECT coalesce((json_agg("root" )->$9), $10 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."name" AS "name", "_root.base"."size" AS "size", "_root.base"."bucket_id" AS "bucketId", "_root.base"."etag" AS "etag", "_root.base"."created_at" AS "createdAt", "_root.base"."updated_at" AS "updatedAt", "_root.base"."is_uploaded" AS "isUploaded", "_root.base"."mime_type" AS "mimeType", "_root.base"."uploaded_by_user_id" AS "uploadedByUserId", "_root.base"."metadata" AS "metadata" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__storage_files" WHERE ($11) ) AS "_root.base" ) AS "_root" ) , (SELECT coalesce(bool_and("check__constraint" ), $12 ) FROM "_mra__storage_files" )
|
|
23 min
0.1%
|
1 ms
|
1,739,788
nhost_hasura
|
WITH "_mra__threads" AS (INSERT INTO "public"."threads" ( "user_id", "profile_member_id", "last_event_at", "linkedin_seat_id", "type", "external_id" ) VALUES (($1)::uuid, ($2)::text, ($3)::timestamptz, ($4)::integer, ($5)::text, ($6)::text) ON CONFLICT ON CONSTRAINT "threads_user_id_external_id_trigger_profile_significant_identif" DO UPDATE SET "profile_member_id" = EXCLUDED."profile_member_id","last_event_at" = EXCLUDED."last_event_at","email_address" = EXCLUDED."email_address","linkedin_seat_id" = EXCLUDED."linkedin_seat_id","type" = EXCLUDED."type","oauth_account_id" = EXCLUDED."oauth_account_id","profile_talent_identifier" = EXCLUDED."profile_talent_identifier","profile_sales_navigator_identifier" = EXCLUDED."profile_sales_navigator_identifier" WHERE ((((("public"."threads"."user_id") = (($7)::uuid)) AND ($8)) AND ($9)) AND ($10)) RETURNING * , CASE WHEN ("public"."threads"."xmax") = ($11) THEN ($12)::boolean ELSE (((("public"."threads"."user_id") = (($13)::uuid)) AND ($14)) AND ($15))::boolean END AS "check__constraint"), "_aca__threads" AS (SELECT "id" , "created_at" , "updated_at" , "user_id" , "external_id" , "linkedin_seat_id" , "last_event_at" , "type" , "profile_linkedin_id" , "profile_talent_identifier" , "profile_sales_navigator_identifier" , "trigger_profile_significant_identifier" , "profile_member_id" , "email_address" , "oauth_account_id" , "canonical_phone_number" FROM "_mra__threads" ) SELECT json_build_object($16, (SELECT coalesce(json_agg("root" ), $17 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", $18 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__threads" WHERE ($19) ) AS "_root.base" ) AS "_root" ), $20, $21 ) , (SELECT coalesce(bool_and("check__constraint" ), $22 ) FROM "_mra__threads" )
|
|
23 min
0.1%
|
1 ms
|
2,293,460
nhost_hasura
|
WITH "_mra__tasks" AS (UPDATE "public"."tasks" SET "linkedin_seat_id" = ($1)::integer,"parameters" = ($2)::jsonb,"group_id" = ($3)::uuid WHERE (((("public"."tasks"."group_id") = (($4)::uuid)) OR ((("public"."tasks"."group_id") IS NULL) AND ((($5)::uuid) IS NULL))) AND ((("public"."tasks"."id") = (($6)::uuid)) AND (NOT (("public"."tasks"."status") = ANY(($7)::text[]))))) RETURNING * , ($8)::boolean AS "check__constraint"), "_aca__tasks" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "type" , "status" , "parameters" , "return" , "user_id" , "retries" , "group_id" , "done_at" , "priority" , "return_status_code" , "profile_id" , "project_id" , "email_address" , "message_scheduled_id" , "linkedin_seat_id" , "file_id" , "external_id" , "oauth_account_id" , "version" , "since" , "duration" , "user_id_or_group_id" , "historyentry_id" , "phone_number_provider_id" , "retry_at" , "trigger_id" , "trigger_worker_type" , "recording_id" , "resume_when" , "skip_extension_queue_and_execute_immediately" , "cancel_at" , "dashboard_id" FROM "_mra__tasks" ) SELECT json_build_object($9, (SELECT coalesce(json_agg("root" ), $10 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."status" AS "status", "_root.base"."type" AS "type", "_root.base"."parameters" AS "parameters", "_root.base"."profile_id" AS "profileId", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", $11 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__tasks" WHERE ($12) ) AS "_root.base" ) AS "_root" ), $13, $14 ) , (SELECT coalesce(bool_and("check__constraint" ), $15 ) FROM "_mra__tasks" )
|
|
21 min
0.1%
|
9 ms
|
139,937
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $5 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."public_identifier" AS "publicIdentifier", "_root.base"."talent_identifier" AS "talentIdentifier", "_root.base"."linkedin_sales_navigator_identifier" AS "linkedinSalesNavigatorIdentifier", "_root.base"."member_id" AS "memberId", "_root.base"."linkedin_id" AS "linkedinId", "_root.base"."external_id" AS "externalId", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."trigger_linkedin_significant_identifier" AS "linkedinSignificantIdentifier", $6 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."profiles" WHERE (((("public"."profiles"."group_id") = ((($1->>$7))::uuid)) OR ((("public"."profiles"."group_id") IS NULL) AND (((($1->>$8))::uuid) IS NULL))) AND ((("public"."profiles"."public_identifier") = ANY(($2)::text[])) OR ((("public"."profiles"."member_id") = ANY(($3)::text[])) OR (("public"."profiles"."trigger_linkedin_significant_identifier") = ANY(($4)::text[]))))) ) AS "_root.base" ) AS "_root"
|
|
20 min
0.1%
|
10 ms
|
119,930
nhost_hasura
|
WITH "_mra__tasks" AS (INSERT INTO "public"."tasks" ( "user_id", "type", "priority", "parameters", "group_id" ) VALUES (($1)::uuid, ($2)::text, ($3)::numeric, ($4)::jsonb, ($5)::uuid) RETURNING * , ($6)::boolean AS "check__constraint"), "_aca__tasks" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "type" , "status" , "parameters" , "return" , "user_id" , "retries" , "group_id" , "done_at" , "priority" , "return_status_code" , "profile_id" , "project_id" , "email_address" , "message_scheduled_id" , "linkedin_seat_id" , "file_id" , "external_id" , "oauth_account_id" , "version" , "since" , "duration" , "user_id_or_group_id" , "historyentry_id" , "phone_number_provider_id" , "retry_at" , "trigger_id" , "trigger_worker_type" , "recording_id" , "resume_when" , "skip_extension_queue_and_execute_immediately" , "cancel_at" , "dashboard_id" FROM "_mra__tasks" ) SELECT (SELECT coalesce((json_agg("root" )->$7), $8 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."status" AS "status", "_root.base"."type" AS "type", "_root.base"."profile_id" AS "profileId", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", $9 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__tasks" WHERE ($10) ) AS "_root.base" ) AS "_root" ) , (SELECT coalesce(bool_and("check__constraint" ), $11 ) FROM "_mra__tasks" )
|
|
19 min
0.1%
|
0 ms
|
3,374,673
nhost_hasura
|
SELECT coalesce(json_agg("root" ORDER BY "root.pg.order" ASC NULLS LAST, "root.pg.id" ASC NULLS LAST), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."created_at" AS "createdAt", "_root.base"."updated_at" AS "updatedAt", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."parent_id" AS "parentId", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", "_root.base"."color_id" AS "colorId", "_root.base"."id" AS "id", "_root.base"."is_hired" AS "isHired", "_root.base"."is_archived" AS "isArchived", "_root.base"."is_rejected" AS "isRejected", "_root.base"."is_protected" AS "isProtected", "_root.base"."is_auto" AS "isAuto", "_root.base"."is_hidden" AS "isHidden", "_root.base"."order" AS "order", "_root.base"."title" AS "title", "_root.base"."targeted_entity" AS "targetedEntity", "_root.base"."trigger_is_made_for_recruitment" AS "isMadeForRecruitment", "_root.base"."trigger_is_made_for_sales" AS "isMadeForSales", "_root.ar.root.children"."children" AS "children", $4 AS "__typename" ) AS "_e" ) ) AS "root", "_root.base"."order" AS "root.pg.order", "_root.base"."id" AS "root.pg.id" FROM (SELECT * FROM "public"."statuses" WHERE ((((("public"."statuses"."group_id") = ((($1->>$5))::uuid)) OR ((("public"."statuses"."group_id") IS NULL) AND (((($1->>$6))::uuid) IS NULL))) OR (("public"."statuses"."group_id") IS NULL)) AND ((("public"."statuses"."deleted_at") IS NULL) AND ((("public"."statuses"."targeted_entity") = (($2)::text)) AND (("public"."statuses"."parent_id") IS NULL)))) ORDER BY "order" ASC NULLS LAST, "id" ASC NULLS LAST LIMIT $7 OFFSET $8) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("children" ORDER BY "root.ar.root.children.pg.order" ASC NULLS LAST), $9 ) AS "children" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.children.base"."created_at" AS "createdAt", "_root.ar.root.children.base"."updated_at" AS "updatedAt", "_root.ar.root.children.base"."deleted_at" AS "deletedAt", "_root.ar.root.children.base"."parent_id" AS "parentId", "_root.ar.root.children.base"."user_id" AS "userId", "_root.ar.root.children.base"."group_id" AS "groupId", "_root.ar.root.children.base"."color_id" AS "colorId", "_root.ar.root.children.base"."id" AS "id", "_root.ar.root.children.base"."is_hired" AS "isHired", "_root.ar.root.children.base"."is_archived" AS "isArchived", "_root.ar.root.children.base"."is_rejected" AS "isRejected", "_root.ar.root.children.base"."is_protected" AS "isProtected", "_root.ar.root.children.base"."is_auto" AS "isAuto", "_root.ar.root.children.base"."is_hidden" AS "isHidden", "_root.ar.root.children.base"."order" AS "order", "_root.ar.root.children.base"."title" AS "title", "_root.ar.root.children.base"."targeted_entity" AS "targetedEntity", "_root.ar.root.children.base"."trigger_is_made_for_recruitment" AS "isMadeForRecruitment", "_root.ar.root.children.base"."trigger_is_made_for_sales" AS "isMadeForSales", $10 AS "__typename" ) AS "_e" ) ) AS "children", "_root.ar.root.children.base"."order" AS "root.ar.root.children.pg.order" FROM (SELECT * FROM "public"."statuses" WHERE ((("_root.base"."id") = ("parent_id")) AND ((((("public"."statuses"."group_id") = ((($1->>$11))::uuid)) OR ((("public"."statuses"."group_id") IS NULL) AND (((($1->>$12))::uuid) IS NULL))) OR (("public"."statuses"."group_id") IS NULL)) AND (("public"."statuses"."deleted_at") IS NULL))) ORDER BY "order" ASC NULLS LAST ) AS "_root.ar.root.children.base" ORDER BY "root.ar.root.children.pg.order" ASC NULLS LAST ) AS "_root.ar.root.children" ) AS "_root.ar.root.children" ON ($13) ORDER BY "root.pg.order" ASC NULLS LAST, "root.pg.id" ASC NULLS LAST ) AS "_root"
|
|
19 min
0.1%
|
7 ms
|
167,482
nhost_hasura
|
WITH "_mra__threads" AS (INSERT INTO "public"."threads" ( "user_id", "last_event_at", "email_address", "type", "oauth_account_id", "external_id" ) VALUES (($1)::uuid, ($2)::timestamptz, ($3)::text, ($4)::text, ($5)::text, ($6)::text), (($7)::uuid, ($8)::timestamptz, ($9)::text, ($10)::text, ($11)::text, ($12)::text) ON CONFLICT ON CONSTRAINT "threads_user_id_external_id_trigger_profile_significant_identif" DO UPDATE SET "profile_member_id" = EXCLUDED."profile_member_id","last_event_at" = EXCLUDED."last_event_at","email_address" = EXCLUDED."email_address","linkedin_seat_id" = EXCLUDED."linkedin_seat_id","type" = EXCLUDED."type","oauth_account_id" = EXCLUDED."oauth_account_id","profile_talent_identifier" = EXCLUDED."profile_talent_identifier","profile_sales_navigator_identifier" = EXCLUDED."profile_sales_navigator_identifier" WHERE ((((("public"."threads"."user_id") = (($13)::uuid)) AND ($14)) AND ($15)) AND ($16)) RETURNING * , CASE WHEN ("public"."threads"."xmax") = ($17) THEN ($18)::boolean ELSE (((("public"."threads"."user_id") = (($19)::uuid)) AND ($20)) AND ($21))::boolean END AS "check__constraint"), "_aca__threads" AS (SELECT "id" , "created_at" , "updated_at" , "user_id" , "external_id" , "linkedin_seat_id" , "last_event_at" , "type" , "profile_linkedin_id" , "profile_talent_identifier" , "profile_sales_navigator_identifier" , "trigger_profile_significant_identifier" , "profile_member_id" , "email_address" , "oauth_account_id" , "canonical_phone_number" FROM "_mra__threads" ) SELECT json_build_object($22, (SELECT coalesce(json_agg("root" ), $23 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", $24 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__threads" WHERE ($25) ) AS "_root.base" ) AS "_root" ), $26, $27 ) , (SELECT coalesce(bool_and("check__constraint" ), $28 ) FROM "_mra__threads" )
|
|
16 min
< 0.1%
|
1 ms
|
1,198,579
nhost_hasura
|
SELECT coalesce((json_agg("root" )->$3), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."name" AS "name", "_root.base"."size" AS "size", "_root.base"."bucket_id" AS "bucketId", "_root.base"."etag" AS "etag", "_root.base"."created_at" AS "createdAt", "_root.base"."updated_at" AS "updatedAt", "_root.base"."is_uploaded" AS "isUploaded", "_root.base"."mime_type" AS "mimeType", "_root.base"."uploaded_by_user_id" AS "uploadedByUserId", "_root.base"."metadata" AS "metadata" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "storage"."files" WHERE (("storage"."files"."id") = (($2)::uuid)) ) AS "_root.base" ) AS "_root"
|
|
16 min
< 0.1%
|
1 ms
|
645,999
nhost_hasura
|
WITH "_mra__storage_files" AS (INSERT INTO "storage"."files" ( "id", "bucket_id", "size", "name", "mime_type" ) VALUES (($1)::uuid, ($2)::text, ($3)::integer, ($4)::text, ($5)::text) RETURNING * , ($6)::boolean AS "check__constraint"), "_aca__storage_files" AS (SELECT "id" , "created_at" , "updated_at" , "bucket_id" , "name" , "size" , "mime_type" , "etag" , "is_uploaded" , "uploaded_by_user_id" , "metadata" FROM "_mra__storage_files" ) SELECT json_build_object($7, (SELECT COUNT(*) FROM "_aca__storage_files" ) ) , (SELECT coalesce(bool_and("check__constraint" ), $8 ) FROM "_mra__storage_files" )
|
|
16 min
< 0.1%
|
22 ms
|
42,424
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."trigger_name" AS "name", "_root.base"."description" AS "description", "_root.base"."website" AS "website", "_root.base"."founded_at" AS "foundedAt", "_root.base"."image_id" AS "imageId", "_root.base"."status_id" AS "statusId", "_root.base"."external_id" AS "externalId", "_root.base"."is_protected_until" AS "isProtectedUntil", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."group_id" AS "groupId", "_root.base"."created_at" AS "createdAt", "_root.base"."updated_at" AS "updatedAt", "_root.base"."parent_id" AS "parentId", "_root.or.parent"."parent" AS "parent", "_root.ar.root.children"."children" AS "children", "_root.ar.root.assignees"."assignees" AS "assignees", "_root.ar.root.projectsCountPerStatusGroup"."projectsCountPerStatusGroup" AS "projectsCountPerStatusGroup", "_root.ar.root.files"."files" AS "files", "_root.or.status"."status" AS "status", "_root.or.legaldata"."legaldata" AS "legaldata", "_root.base"."linkedin_company_id" AS "linkedinCompanyId", "_root.or.linkedinCompanyData"."linkedinCompanyData" AS "linkedinCompanyData", "_root.ar.root.fieldsValues"."fieldsValues" AS "fieldsValues", "_root.ar.root.projects"."projects" AS "projects", "_root.or.image"."image" AS "image", "_root.ar.root.phoneNumbers"."phoneNumbers" AS "phoneNumbers", "_root.ar.root.emailAddresses"."emailAddresses" AS "emailAddresses", $4 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."companies" WHERE ((("public"."companies"."group_id") = ((($1->>$5))::uuid)) AND (("public"."companies"."id") = ANY(($2)::uuid[]))) LIMIT $6 ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.linkedinCompanyData.base"."id" AS "id", "_root.or.linkedinCompanyData.base"."name" AS "name", "_root.or.linkedinCompanyData.base"."description" AS "description", "_root.or.linkedinCompanyData.base"."tagline" AS "tagline", "_root.or.linkedinCompanyData.base"."founded_at" AS "foundedAt", "_root.or.linkedinCompanyData.base"."linkedin_employee_count" AS "linkedinEmployeeCount", "_root.or.linkedinCompanyData.base"."linkedin_employee_start_count" AS "linkedinEmployeeStartCount", "_root.or.linkedinCompanyData.base"."linkedin_employee_end_count" AS "linkedinEmployeeEndCount", "_root.or.linkedinCompanyData.base"."linkedin_url" AS "linkedinUrl", "_root.or.linkedinCompanyData.base"."universal_name" AS "universalName", "_root.or.linkedinCompanyData.base"."linkedin_id" AS "linkedinId", "_root.or.linkedinCompanyData.base"."website" AS "website", "_root.or.linkedinCompanyData.or.image"."image" AS "image", "_root.or.linkedinCompanyData.ar.linkedinCompanyData.industries"."industries" AS "industries", $7 AS "__typename" ) AS "_e" ) ) AS "linkedinCompanyData" FROM (SELECT * FROM "public"."linkedin_companies_data" WHERE (("_root.base"."linkedin_company_id") = ("id")) LIMIT $8 ) AS "_root.or.linkedinCompanyData.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "public"."images_public_url"("_root.or.linkedinCompanyData.or.image.base") AS "publicUrl", $9 AS "__typename" ) AS "_e" ) ) AS "image" FROM (SELECT * FROM "public"."images" WHERE (("_root.or.linkedinCompanyData.base"."image_id") = ("id")) LIMIT $10 ) AS "_root.or.linkedinCompanyData.or.image.base" ) AS "_root.or.linkedinCompanyData.or.image" ON ($11) LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("industries" ), $12 ) AS "industries" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "md5_139a57d5aa64bc630fd443739d5a04c9__root.or.linkedinCompanyData.ar.linkedinCompanyData.industries.or.industry"."industry" AS "industry", $13 AS "__typename" ) AS "_e" ) ) AS "industries" FROM (SELECT * FROM "public"."companies_industries" WHERE ((("_root.or.linkedinCompanyData.base"."id") = ("company_id")) AND ((("public"."companies_industries"."deleted_at") IS NULL) AND (EXISTS (SELECT $14 FROM "public"."industries" AS "__be_0_industries" WHERE (((("__be_0_industries"."id") = ("public"."companies_industries"."industry_id")) AND ($15)) AND (($16) AND (((("__be_0_industries"."deleted_at") IS NULL) AND ($17)) AND ($18)))) )))) ) AS "md5_4fab47b32c896b024a1e4e822e101b01__root.or.linkedinCompanyData.ar.linkedinCompanyData.industries.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "md5_92af78fe750a4b68254938e0ecf134db__root.or.linkedinCompanyData.ar.linkedinCompanyData.industries.or.industry.base"."name_english" AS "nameEnglish", "md5_92af78fe750a4b68254938e0ecf134db__root.or.linkedinCompanyData.ar.linkedinCompanyData.industries.or.industry.base"."name_french" AS "nameFrench", "md5_92af78fe750a4b68254938e0ecf134db__root.or.linkedinCompanyData.ar.linkedinCompanyData.industries.or.industry.base"."linkedin_id" AS "linkedinId", "md5_92af78fe750a4b68254938e0ecf134db__root.or.linkedinCompanyData.ar.linkedinCompanyData.industries.or.industry.base"."id" AS "id", $19 AS "__typename" ) AS "_e" ) ) AS "industry" FROM (SELECT * FROM "public"."industries" WHERE (("md5_4fab47b32c896b024a1e4e822e101b01__root.or.linkedinCompanyData.ar.linkedinCompanyData.industries.base"."industry_id") = ("id")) LIMIT $20 ) AS "md5_92af78fe750a4b68254938e0ecf134db__root.or.linkedinCompanyData.ar.linkedinCompanyData.industries.or.industry.base" ) AS "md5_139a57d5aa64bc630fd443739d5a04c9__root.or.linkedinCompanyData.ar.linkedinCompanyData.industries.or.industry" ON ($21) ) AS "_root.or.linkedinCompanyData.ar.linkedinCompanyData.industries" ) AS "_root.or.linkedinCompanyData.ar.linkedinCompanyData.industries" ON ($22) ) AS "_root.or.linkedinCompanyData" ON ($23) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "public"."images_public_url"("_root.or.image.base") AS "publicUrl", $24 AS "__typename" ) AS "_e" ) ) AS "image" FROM (SELECT * FROM "public"."images" WHERE (("_root.base"."image_id") = ("id")) LIMIT $25 ) AS "_root.or.image.base" ) AS "_root.or.image" ON ($26) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.status.base"."title" AS "title", "_root.or.status.base"."color_id" AS "colorId", "_root.or.status.base"."is_auto" AS "isAuto", "_root.or.status.base"."id" AS "id", $27 AS "__typename" ) AS "_e" ) ) AS "status" FROM (SELECT * FROM "public"."statuses" WHERE ((("_root.base"."status_id") = ("id")) AND (((("public"."statuses"."group_id") = ((($1->>$28))::uuid)) OR ((("public"."statuses"."group_id") IS NULL) AND (((($1->>$29))::uuid) IS NULL))) OR (("public"."statuses"."group_id") IS NULL))) LIMIT $30 ) AS "_root.or.status.base" ) AS "_root.or.status" ON ($31) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.parent.base"."id" AS "id", "_root.or.parent.base"."trigger_name" AS "name", "_root.or.parent.or.linkedinCompanyData"."linkedinCompanyData" AS "linkedinCompanyData", "_root.or.parent.or.image"."image" AS "image", $32 AS "__typename" ) AS "_e" ) ) AS "parent" FROM (SELECT * FROM "public"."companies" WHERE ((("_root.base"."parent_id") = ("id")) AND (("public"."companies"."group_id") = ((($1->>$33))::uuid))) LIMIT $34 ) AS "_root.or.parent.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.parent.or.linkedinCompanyData.base"."name" AS "name", "_root.or.parent.or.linkedinCompanyData.or.image"."image" AS "image", $35 AS "__typename" ) AS "_e" ) ) AS "linkedinCompanyData" FROM (SELECT * FROM "public"."linkedin_companies_data" WHERE (("_root.or.parent.base"."linkedin_company_id") = ("id")) LIMIT $36 ) AS "_root.or.parent.or.linkedinCompanyData.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "public"."images_public_url"("_root.or.parent.or.linkedinCompanyData.or.image.base") AS "publicUrl", $37 AS "__typename" ) AS "_e" ) ) AS "image" FROM (SELECT * FROM "public"."images" WHERE (("_root.or.parent.or.linkedinCompanyData.base"."image_id") = ("id")) LIMIT $38 ) AS "_root.or.parent.or.linkedinCompanyData.or.image.base" ) AS "_root.or.parent.or.linkedinCompanyData.or.image" ON ($39) ) AS "_root.or.parent.or.linkedinCompanyData" ON ($40) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "public"."images_public_url"("_root.or.parent.or.image.base") AS "publicUrl", $41 AS "__typename" ) AS "_e" ) ) AS "image" FROM (SELECT * FROM "public"."images" WHERE (("_root.or.parent.base"."image_id") = ("id")) LIMIT $42 ) AS "_root.or.parent.or.image.base" ) AS "_root.or.parent.or.image" ON ($43) ) AS "_root.or.parent" ON ($44) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.legaldata.base"."id" AS "id", "_root.or.legaldata.base"."created_at" AS "createdAt", "_root.or.legaldata.base"."deleted_at" AS "deletedAt", "_root.or.legaldata.base"."updated_at" AS "updatedAt", "_root.or.legaldata.base"."legal_name" AS "legalName", "_root.or.legaldata.base"."siren" AS "siren", "_root.or.legaldata.base"."vat_number" AS "vatNumber", "_root.or.legaldata.base"."activity" AS "activity", "_root.or.legaldata.base"."codenaf" AS "codenaf", "_root.or.legaldata.base"."codenaf_title" AS "codenafTitle", "_root.or.legaldata.base"."founded_at" AS "foundedAt", "_root.or.legaldata.ar.legaldata.locations"."locations" AS "locations", $45 AS "__typename" ) AS "_e" ) ) AS "legaldata" FROM (SELECT * FROM "public"."companies_legaldata" WHERE (("_root.base"."id") = ("company_id")) LIMIT $46 ) AS "_root.or.legaldata.base" LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("locations" ), $47 ) AS "locations" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.legaldata.ar.legaldata.locations.base"."siret" AS "siret", "_root.or.l
|
|
15 min
< 0.1%
|
3 ms
|
312,590
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."linkedin_id" AS "linkedinId", "_root.base"."universal_name" AS "universalName", $5 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."linkedin_companies_data" WHERE ((("public"."linkedin_companies_data"."linkedin_id") = ANY(($2)::text[])) OR (("public"."linkedin_companies_data"."universal_name") = ANY(($3)::text[]))) ) AS "_root.base" ) AS "_root"
|
|
15 min
< 0.1%
|
175 ms
|
5,182
nhost_hasura
|
SELECT coalesce(json_agg("root" ORDER BY "root.or.historyEntry.or.project.pg.created_at" DESC NULLS LAST, "root.pg.created_at" DESC NULLS LAST, "root.pg.id" ASC NULLS LAST), $7 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."created_at" AS "createdAt", "_root.base"."updated_at" AS "updatedAt", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."read_at" AS "readAt", "_root.base"."type" AS "type", "_root.base"."user_id" AS "userId", "_root.or.profile"."profile" AS "profile", "_root.or.messageScheduled"."messageScheduled" AS "messageScheduled", "_root.or.historyEntry"."historyEntry" AS "historyEntry", $8 AS "__typename" ) AS "_e" ) ) AS "root", "_root.or.historyEntry"."root.or.historyEntry.or.project.pg.created_at" AS "root.or.historyEntry.or.project.pg.created_at", "_root.base"."created_at" AS "root.pg.created_at", "_root.base"."id" AS "root.pg.id" FROM (SELECT * FROM "public"."notifications" WHERE ((("public"."notifications"."group_id") = ((($1->>$9))::uuid)) AND (((("public"."notifications"."deleted_at") IS NULL) OR (("public"."notifications"."deleted_at") >= (($2)::timestamptz))) AND ((("public"."notifications"."type") = (($3)::text)) AND (((("public"."notifications"."deleted_at") IS NULL) AND (EXISTS (SELECT $10 FROM "public"."profiles" AS "__be_0_profiles" WHERE (((("__be_0_profiles"."id") = ("public"."notifications"."profile_id")) AND ($11)) AND (((((("__be_0_profiles"."group_id") = ((($1->>$12))::uuid)) OR ((("__be_0_profiles"."group_id") IS NULL) AND (((($1->>$13))::uuid) IS NULL))) AND ($14)) AND ($15)) AND (((("__be_0_profiles"."deleted_at") IS NULL) AND ($16)) AND ($17)))) ))) AND (((EXISTS (SELECT $18 FROM "public"."historyentries" AS "__be_1_historyentries" WHERE (((("__be_1_historyentries"."id") = ("public"."notifications"."historyentry_id")) AND ($19)) AND (((((((("__be_1_historyentries"."group_id") = ((($1->>$20))::uuid)) OR ((("__be_1_historyentries"."group_id") IS NULL) AND (((($1->>$21))::uuid) IS NULL))) AND ($22)) AND ($23)) AND ((((("__be_1_historyentries"."trigger_is_confidentiality_forced") = (($24)::boolean)) AND ($25)) AND ($26)) AND ($27))) AND ($28)) AND (((("__be_1_historyentries"."deleted_at") IS NULL) AND ($29)) AND ((EXISTS (SELECT $30 FROM "public"."projects" AS "__be_2_projects" WHERE (((("__be_2_projects"."id") = ("__be_1_historyentries"."project_id")) AND ($31)) AND (((((("__be_2_projects"."group_id") = ((($1->>$32))::uuid)) OR ((("__be_2_projects"."group_id") IS NULL) AND (((($1->>$33))::uuid) IS NULL))) AND ($34)) AND ($35)) AND ((EXISTS (SELECT $36 FROM "public"."projects_assignees" AS "__be_3_projects_assignees" WHERE (((("__be_3_projects_assignees"."project_id") = ("__be_2_projects"."id")) AND ($37)) AND (($38) AND (((("__be_3_projects_assignees"."user_id") = (($4)::uuid)) AND ($39)) AND (((("__be_3_projects_assignees"."deleted_at") IS NULL) AND ($40)) AND ($41))))) )) AND (((("__be_2_projects"."deleted_at") IS NULL) AND ($42)) AND ($43))))) )) AND ($44))))) )) OR ((("public"."notifications"."user_id") = (($5)::uuid)) AND (EXISTS (SELECT $45 FROM "public"."historyentries" AS "__be_4_historyentries" WHERE (((("__be_4_historyentries"."id") = ("public"."notifications"."historyentry_id")) AND ($46)) AND (((((((("__be_4_historyentries"."group_id") = ((($1->>$47))::uuid)) OR ((("__be_4_historyentries"."group_id") IS NULL) AND (((($1->>$48))::uuid) IS NULL))) AND ($49)) AND ($50)) AND ((((("__be_4_historyentries"."trigger_is_confidentiality_forced") = (($51)::boolean)) AND ($52)) AND ($53)) AND ($54))) AND ($55)) AND (((("__be_4_historyentries"."deleted_at") IS NULL) AND ($56)) AND (((("__be_4_historyentries"."project_id") IS NULL) AND ($57)) AND ($58))))) )))) AND ((("public"."notifications"."read_at") IS NULL) OR (("public"."notifications"."read_at") >= (($6)::timestamptz)))))))) ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT "_root.or.historyEntry.or.project"."root.or.historyEntry.or.project.pg.created_at" AS "root.or.historyEntry.or.project.pg.created_at", row_to_json((SELECT "_e" FROM (SELECT "_root.or.historyEntry.base"."id" AS "id", "_root.or.historyEntry.base"."type" AS "type", "_root.or.historyEntry.base"."trigger_occurred_at" AS "occurredAt", "_root.or.historyEntry.base"."source" AS "source", "public"."historyentries_message_with_confidentiality_settings"("_root.or.historyEntry.base", "hasura_session" => $1) AS "messageWithConfidentialitySettings", "public"."historyentries_subject_with_confidentiality_settings"("_root.or.historyEntry.base", "hasura_session" => $1) AS "subjectWithConfidentialitySettings", "_root.or.historyEntry.or.project"."project" AS "project", "_root.or.historyEntry.ar.historyEntry.files"."files" AS "files", $59 AS "__typename" ) AS "_e" ) ) AS "historyEntry" FROM (SELECT * FROM "public"."historyentries" WHERE ((("_root.base"."historyentry_id") = ("id")) AND (((("public"."historyentries"."group_id") = ((($1->>$60))::uuid)) OR ((("public"."historyentries"."group_id") IS NULL) AND (((($1->>$61))::uuid) IS NULL))) AND (("public"."historyentries"."trigger_is_confidentiality_forced") = (($62)::boolean)))) LIMIT $63 ) AS "_root.or.historyEntry.base" LEFT OUTER JOIN LATERAL (SELECT "_root.or.historyEntry.or.project.base"."created_at" AS "root.or.historyEntry.or.project.pg.created_at", row_to_json((SELECT "_e" FROM (SELECT "_root.or.historyEntry.or.project.base"."id" AS "id", "_root.or.historyEntry.or.project.base"."name" AS "name", "_root.or.historyEntry.or.project.or.company"."company" AS "company", $64 AS "__typename" ) AS "_e" ) ) AS "project" FROM (SELECT * FROM "public"."projects" WHERE ((("_root.or.historyEntry.base"."project_id") = ("id")) AND ((("public"."projects"."group_id") = ((($1->>$65))::uuid)) OR ((("public"."projects"."group_id") IS NULL) AND (((($1->>$66))::uuid) IS NULL)))) LIMIT $67 ) AS "_root.or.historyEntry.or.project.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.historyEntry.or.project.or.company.base"."id" AS "id", "md5_077948e7bbff295097ff401783cb3f33__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData"."linkedinCompanyData" AS "linkedinCompanyData", $68 AS "__typename" ) AS "_e" ) ) AS "company" FROM (SELECT * FROM "public"."companies" WHERE ((("_root.or.historyEntry.or.project.base"."company_id") = ("id")) AND (("public"."companies"."group_id") = ((($1->>$69))::uuid))) LIMIT $70 ) AS "_root.or.historyEntry.or.project.or.company.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "md5_17543089adf72f49b3baaef6b1428de7__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.base"."id" AS "id", "md5_17543089adf72f49b3baaef6b1428de7__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.base"."name" AS "name", "md5_842292468fab93732a798efc38bc0209__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.or.image"."image" AS "image", $71 AS "__typename" ) AS "_e" ) ) AS "linkedinCompanyData" FROM (SELECT * FROM "public"."linkedin_companies_data" WHERE (("_root.or.historyEntry.or.project.or.company.base"."linkedin_company_id") = ("id")) LIMIT $72 ) AS "md5_17543089adf72f49b3baaef6b1428de7__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "md5_ec3723e1a27bd9103837f6711a574140__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.or.image.base"."id" AS "id", "md5_ec3723e1a27bd9103837f6711a574140__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.or.image.base"."file_id" AS "fileId", "public"."images_public_url"("md5_ec3723e1a27bd9103837f6711a574140__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.or.image.base") AS "publicUrl", $73 AS "__typename" ) AS "_e" ) ) AS "image" FROM (SELECT * FROM "public"."images" WHERE (("md5_17543089adf72f49b3baaef6b1428de7__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.base"."image_id") = ("id")) LIMIT $74 ) AS "md5_ec3723e1a27bd9103837f6711a574140__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.or.image.base" ) AS "md5_842292468fab93732a798efc38bc0209__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.or.image" ON ($75) ) AS "md5_077948e7bbff295097ff401783cb3f33__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData" ON ($76) ) AS "_root.or.historyEntry.or.project.or.company" ON ($77) ) AS "_root.or.historyEntry.or.project" ON ($78) LEFT OUTER JOIN LATERAL (SELECT (SELECT coalesce(json_agg("_sub_query"."files" ORDER BY "ob_col_1" ASC NULLS LAST), $79 ) FROM (SELECT "_unnest_table"."files" AS "files", "_unnest_table"."ob_col_1" AS "ob_col_1" FROM UNNEST(array_agg("files" ), array_agg("root.or.historyEntry.ar.historyEntry.files.pg.created_at" )) AS "_unnest_table"("files", "ob_col_1") ORDER BY "ob_col_1" ASC NULLS LAST LIMIT $80 ) AS "_sub_query" ) AS "files" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.historyEntry.ar.historyEntry.files.base"."file_id" AS "fileId", "_root.or.historyEntry.ar.historyEntry.files.base"."created_at" AS "createdAt", "_root.or.historyEntry.ar.historyEntry.files.base"."updated_at" AS "updatedAt", "_root.or.historyEntry.ar.historyEntry.files.or.file"."file" AS "file", $81 AS "__typename" ) AS "_e" ) ) AS "files", "_root.or.historyEntry.ar.historyEntry.files.base"."created_at" AS "root.or.historyEntry.ar.historyEntry.files.pg.created_at" FROM (SELECT * FROM "public"."historyentries_files" WHERE ((("_root.or.historyEntry.base"."id") = ("historyentry_id")) AND ((EXISTS (SELECT $82 FROM "public"."historyentries" AS "__be_0_historyentries" WHERE (((("__be_0_historyentries"."id") = ("public"."historyentries_files"."historyentry_id")) AND ($83)) AND (($84) AND ((((("
|
|
15 min
< 0.1%
|
3 ms
|
327,106
nhost_hasura
|
WITH "_mutres__images" AS (INSERT INTO "public"."images" ( "external_url" ) VALUES (($1)::text) ON CONFLICT ON CONSTRAINT "images_pkey" DO UPDATE SET "updated_at" = EXCLUDED."updated_at" WHERE (($2) AND ($3)) RETURNING * , CASE WHEN ("public"."images"."xmax") = ($4) THEN ($5)::boolean ELSE ($6)::boolean END AS "check__constraint") SELECT json_build_object($7, (SELECT COUNT(*) FROM "_mutres__images" ), $8, (SELECT coalesce(json_agg("root" ), $9 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT ("_root.base"."id")::text AS "id", ("_root.base"."created_at")::text AS "created_at", ("_root.base"."updated_at")::text AS "updated_at", ("_root.base"."deleted_at")::text AS "deleted_at", ("_root.base"."external_url")::text AS "external_url", ("_root.base"."file_id")::text AS "file_id", ("_root.base"."public_url")::text AS "public_url", ("_root.base"."loaded_at")::text AS "loaded_at" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_mutres__images" WHERE ($10) ) AS "_root.base" ) AS "_root" ) ) , (SELECT coalesce(bool_and("check__constraint" ), $11 ) FROM "_mutres__images" )
|
|
15 min
< 0.1%
|
2 ms
|
569,174
nhost_hasura
|
WITH "_mra__tasks" AS (INSERT INTO "public"."tasks" ( "user_id", "linkedin_seat_id", "status", "type", "oauth_account_id", "retries", "priority", "parameters", "project_id", "external_id", "profile_id", "group_id" ) VALUES (($1)::uuid, ($2)::integer, ($3)::text, ($4)::text, ($5)::text, ($6)::integer, ($7)::numeric, ($8)::jsonb, ($9)::uuid, ($10)::text, ($11)::uuid, ($12)::uuid) RETURNING * , ($13)::boolean AS "check__constraint"), "_aca__tasks" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "type" , "status" , "parameters" , "return" , "user_id" , "retries" , "group_id" , "done_at" , "priority" , "return_status_code" , "profile_id" , "project_id" , "email_address" , "message_scheduled_id" , "linkedin_seat_id" , "file_id" , "external_id" , "oauth_account_id" , "version" , "since" , "duration" , "user_id_or_group_id" , "historyentry_id" , "phone_number_provider_id" , "retry_at" , "trigger_id" , "trigger_worker_type" , "recording_id" , "resume_when" , "skip_extension_queue_and_execute_immediately" , "cancel_at" , "dashboard_id" FROM "_mra__tasks" ) SELECT (SELECT coalesce((json_agg("root" )->$14), $15 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."status" AS "status", "_root.base"."type" AS "type", "_root.base"."profile_id" AS "profileId", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", $16 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__tasks" WHERE ($17) ) AS "_root.base" ) AS "_root" ) , (SELECT coalesce(bool_and("check__constraint" ), $18 ) FROM "_mra__tasks" )
|
|
15 min
< 0.1%
|
0 ms
|
5,019,947
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."refresh_token_hash" AS "refreshTokenHash", "_root.base"."expires_at" AS "expiresAt", "_root.base"."user_id" AS "userId", "_root.or.user"."user" AS "user", $5 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "auth"."refresh_tokens" WHERE ((("auth"."refresh_tokens"."id") = (($2)::uuid)) OR (("auth"."refresh_tokens"."refresh_token_hash") = (($3)::varchar))) ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.user.or.group"."group" AS "group", $6 AS "__typename" ) AS "_e" ) ) AS "user" FROM (SELECT * FROM "auth"."users" WHERE (("_root.base"."user_id") = ("id")) LIMIT $7 ) AS "_root.or.user.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.user.or.group.base"."group_id" AS "groupId", $8 AS "__typename" ) AS "_e" ) ) AS "group" FROM (SELECT * FROM "public"."users_groups" WHERE (("_root.or.user.base"."id") = ("user_id")) LIMIT $9 ) AS "_root.or.user.or.group.base" ) AS "_root.or.user.or.group" ON ($10) ) AS "_root.or.user" ON ($11) ) AS "_root"
|
|
15 min
< 0.1%
|
1 ms
|
1,392,484
nhost_hasura
|
-- name: GetUserByRefreshTokenHash :one
WITH refresh_token AS (
SELECT id, created_at, expires_at, user_id, metadata, type, refresh_token_hash FROM auth.refresh_tokens
WHERE refresh_token_hash = $1 AND type = $2 AND expires_at > now()
LIMIT $3
)
SELECT id, created_at, updated_at, last_seen, disabled, display_name, avatar_url, locale, email, phone_number, password_hash, email_verified, phone_number_verified, new_email, otp_method_last_used, otp_hash, otp_hash_expires_at, default_role, is_anonymous, totp_secret, active_mfa_type, ticket, ticket_expires_at, metadata, webauthn_current_challenge FROM auth.users
WHERE id = (SELECT user_id FROM refresh_token) LIMIT $4
|
|
14 min
< 0.1%
|
0 ms
|
8,527,167
nhost_hasura
|
WITH "_mra__quotas_usage" AS (UPDATE "public"."quotas_usage" SET "used" = ("used"+(($1)::numeric)::numeric) WHERE ((("public"."quotas_usage"."user_id") = (($2)::uuid)) AND ((("public"."quotas_usage"."type") = (($3)::text)) AND (("public"."quotas_usage"."date") = (($4)::date)))) RETURNING * , (((("public"."quotas_usage"."user_id") = (($5)::uuid)) AND ($6)) AND ($7))::boolean AS "check__constraint"), "_aca__quotas_usage" AS (SELECT "user_id" , "type" , "used" , "date" FROM "_mra__quotas_usage" ) SELECT json_build_object($8, (SELECT COUNT(*) FROM "_aca__quotas_usage" ), $9, $10 ) , (SELECT coalesce(bool_and("check__constraint" ), $11 ) FROM "_mra__quotas_usage" )
|
|
13 min
< 0.1%
|
72 ms
|
11,173
nhost_hasura
|
WITH "_mra__historyentries" AS (INSERT INTO "public"."historyentries" ( "user_id", "deleted_at", "id", "linkedin_seat_id", "type", "external_id", "created_at", "subject", "message", "profile_id", "group_id", "external_thread_id" ) VALUES (($1)::uuid, ($2)::timestamptz, ($3)::uuid, ($4)::integer, ($5)::text, ($6)::text, ($7)::timestamptz, ($8)::text, ($9)::text, ($10)::uuid, ($11)::uuid, ($12)::text) ON CONFLICT ON CONSTRAINT "historyentries_external_id_user_id_profile_id_key" DO UPDATE SET "deleted_at" = EXCLUDED."deleted_at","linkedin_seat_id" = EXCLUDED."linkedin_seat_id","type" = EXCLUDED."type","external_id" = EXCLUDED."external_id","created_at" = EXCLUDED."created_at","subject" = EXCLUDED."subject","message" = EXCLUDED."message","profile_id" = EXCLUDED."profile_id","external_thread_id" = EXCLUDED."external_thread_id" WHERE (((((((("public"."historyentries"."group_id") = (($13)::uuid)) OR ((("public"."historyentries"."group_id") IS NULL) AND ((($14)::uuid) IS NULL))) AND ($15)) AND ($16)) AND ((((("public"."historyentries"."trigger_is_confidentiality_forced") = (($17)::boolean)) AND ($18)) AND ($19)) AND ($20))) AND ($21)) AND ($22)) RETURNING * , CASE WHEN ("public"."historyentries"."xmax") = ($23) THEN ((((((("public"."historyentries"."group_id") = (($24)::uuid)) OR ((("public"."historyentries"."group_id") IS NULL) AND ((($25)::uuid) IS NULL))) AND ($26)) AND ($27)) AND (((EXISTS (SELECT $28 FROM "public"."profiles" AS "_be_0_profiles" WHERE (((("_be_0_profiles"."id") = ("public"."historyentries"."profile_id")) AND ($29)) AND (($30) AND ((((("_be_0_profiles"."group_id") = (($31)::uuid)) OR ((("_be_0_profiles"."group_id") IS NULL) AND ((($32)::uuid) IS NULL))) AND ($33)) AND ($34)))) )) AND ($35)) AND ($36))) AND ($37))::boolean ELSE ((((("public"."historyentries"."group_id") = (($38)::uuid)) OR ((("public"."historyentries"."group_id") IS NULL) AND ((($39)::uuid) IS NULL))) AND ($40)) AND ($41))::boolean END AS "check__constraint"), "_aca__historyentries" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "profile_id" , "user_id" , "type" , "data" , "message" , "metadata" , "subject" , "external_id" , "external_thread_id" , "event_start_at" , "event_end_at" , "emailAddress" , "sender_user_id" , "linkedin_seat_id" , "is_manually_created" , "project_id" , "message_scheduled_id" , "jobboard_offer_id" , "group_id" , "trigger_occurred_at" , "source" , "should_notify_jobboard_on_change" , "sub_type_id" , "tags" , "phone_number" , "is_merged_from_id" , "recording_id" , "draft_created_at" , "oauth_account_id" , "trigger_confidentiality_forced" , "trigger_is_confidentiality_forced" FROM "_mra__historyentries" ) SELECT json_build_object($42, (SELECT COUNT(*) FROM "_aca__historyentries" ), $43, (SELECT coalesce(json_agg("root" ), $44 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", $45 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__historyentries" WHERE ($46) ) AS "_root.base" ) AS "_root" ), $47, $48 ) , (SELECT coalesce(bool_and("check__constraint" ), $49 ) FROM "_mra__historyentries" )
|
|
13 min
< 0.1%
|
3 ms
|
228,062
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."name" AS "name", "_root.base"."user_id" AS "userId", "_root.base"."linkedin_id" AS "linkedinId", "_root.base"."created_at" AS "createdAt", "_root.base"."updated_at" AS "updatedAt", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."color_id" AS "colorId", "_root.base"."preset_id" AS "presetId", "_root.base"."is_made_for_recruitment" AS "isMadeForRecruitment", "_root.base"."is_made_for_sales" AS "isMadeForSales", "_root.base"."group_id" AS "groupId", "_root.or.group"."group" AS "group", "_root.or.user"."user" AS "user", "_root.ar.root.users"."users" AS "users", "_root.ar.root.assignees"."assignees" AS "assignees", "_root.base"."linkedin_contract_id" AS "linkedinContractId", "_root.base"."status_id" AS "statusId", "_root.base"."ignore_history_before_project_created_at" AS "ignoreHistoryBeforeProjectCreatedAt", "_root.base"."company_id" AS "companyId", "_root.base"."external_id" AS "externalId", "_root.base"."reference_id" AS "referenceId", "_root.base"."linkedin_id_type" AS "linkedinIdType", "_root.base"."trigger_short_id" AS "shortId", "_root.ar.root.files"."files" AS "files", "_root.or.status"."status" AS "status", "_root.or.company"."company" AS "company", "_root.ar.root.fieldsValues"."fieldsValues" AS "fieldsValues", "_root.ar.root.jobBoardsOffers"."jobBoardsOffers" AS "jobBoardsOffers", "_root.ar.root.projectJobBoards"."projectJobBoards" AS "projectJobBoards", "_root.ar.root.profilesCountPerStatusGroup"."profilesCountPerStatusGroup" AS "profilesCountPerStatusGroup", $5 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."projects" WHERE (((("public"."projects"."group_id") = ((($1->>$6))::uuid)) OR ((("public"."projects"."group_id") IS NULL) AND (((($1->>$7))::uuid) IS NULL))) AND ((("public"."projects"."deleted_at") IS NULL) AND (("public"."projects"."id") = (($3)::uuid)))) LIMIT $8 ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.company.base"."id" AS "id", "_root.or.company.base"."description" AS "description", "_root.or.company.base"."website" AS "website", "_root.or.company.base"."trigger_name" AS "name", "_root.or.company.or.image"."image" AS "image", "_root.or.company.or.parent"."parent" AS "parent", "_root.or.company.or.linkedinCompanyData"."linkedinCompanyData" AS "linkedinCompanyData", "_root.or.company.or.legaldata"."legaldata" AS "legaldata", $9 AS "__typename" ) AS "_e" ) ) AS "company" FROM (SELECT * FROM "public"."companies" WHERE ((("_root.base"."company_id") = ("id")) AND (("public"."companies"."group_id") = ((($1->>$10))::uuid))) LIMIT $11 ) AS "_root.or.company.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.company.or.linkedinCompanyData.base"."id" AS "id", "_root.or.company.or.linkedinCompanyData.base"."name" AS "name", "_root.or.company.or.linkedinCompanyData.base"."tagline" AS "tagline", "_root.or.company.or.linkedinCompanyData.base"."description" AS "description", "_root.or.company.or.linkedinCompanyData.base"."founded_at" AS "foundedAt", "_root.or.company.or.linkedinCompanyData.base"."linkedin_employee_count" AS "linkedinEmployeeCount", "_root.or.company.or.linkedinCompanyData.base"."linkedin_employee_start_count" AS "linkedinEmployeeStartCount", "_root.or.company.or.linkedinCompanyData.base"."linkedin_employee_end_count" AS "linkedinEmployeeEndCount", "_root.or.company.or.linkedinCompanyData.base"."linkedin_url" AS "linkedinUrl", "_root.or.company.or.linkedinCompanyData.base"."website" AS "website", "_root.or.company.or.linkedinCompanyData.or.image"."image" AS "image", $12 AS "__typename" ) AS "_e" ) ) AS "linkedinCompanyData" FROM (SELECT * FROM "public"."linkedin_companies_data" WHERE (("_root.or.company.base"."linkedin_company_id") = ("id")) LIMIT $13 ) AS "_root.or.company.or.linkedinCompanyData.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "public"."images_public_url"("_root.or.company.or.linkedinCompanyData.or.image.base") AS "publicUrl", $14 AS "__typename" ) AS "_e" ) ) AS "image" FROM (SELECT * FROM "public"."images" WHERE (("_root.or.company.or.linkedinCompanyData.base"."image_id") = ("id")) LIMIT $15 ) AS "_root.or.company.or.linkedinCompanyData.or.image.base" ) AS "_root.or.company.or.linkedinCompanyData.or.image" ON ($16) ) AS "_root.or.company.or.linkedinCompanyData" ON ($17) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.company.or.parent.base"."id" AS "id", "_root.or.company.or.parent.base"."trigger_name" AS "name", "_root.or.company.or.parent.or.linkedinCompanyData"."linkedinCompanyData" AS "linkedinCompanyData", $18 AS "__typename" ) AS "_e" ) ) AS "parent" FROM (SELECT * FROM "public"."companies" WHERE ((("_root.or.company.base"."parent_id") = ("id")) AND (("public"."companies"."group_id") = ((($1->>$19))::uuid))) LIMIT $20 ) AS "_root.or.company.or.parent.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.company.or.parent.or.linkedinCompanyData.base"."name" AS "name", $21 AS "__typename" ) AS "_e" ) ) AS "linkedinCompanyData" FROM (SELECT * FROM "public"."linkedin_companies_data" WHERE (("_root.or.company.or.parent.base"."linkedin_company_id") = ("id")) LIMIT $22 ) AS "_root.or.company.or.parent.or.linkedinCompanyData.base" ) AS "_root.or.company.or.parent.or.linkedinCompanyData" ON ($23) ) AS "_root.or.company.or.parent" ON ($24) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "public"."images_public_url"("_root.or.company.or.image.base") AS "publicUrl", $25 AS "__typename" ) AS "_e" ) ) AS "image" FROM (SELECT * FROM "public"."images" WHERE (("_root.or.company.base"."image_id") = ("id")) LIMIT $26 ) AS "_root.or.company.or.image.base" ) AS "_root.or.company.or.image" ON ($27) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.company.or.legaldata.base"."id" AS "id", "_root.or.company.or.legaldata.base"."activity" AS "activity", "_root.or.company.or.legaldata.base"."codenaf" AS "codenaf", "_root.or.company.or.legaldata.base"."legal_name" AS "legalName", "_root.or.company.or.legaldata.base"."siren" AS "siren", $28 AS "__typename" ) AS "_e" ) ) AS "legaldata" FROM (SELECT * FROM "public"."companies_legaldata" WHERE (("_root.or.company.base"."id") = ("company_id")) LIMIT $29 ) AS "_root.or.company.or.legaldata.base" ) AS "_root.or.company.or.legaldata" ON ($30) ) AS "_root.or.company" ON ($31) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.user.base"."display_name" AS "displayName", "_root.or.user.base"."email" AS "email", "_root.or.user.base"."id" AS "id", "_root.or.user.base"."disabled" AS "disabled", $32 AS "__typename" ) AS "_e" ) ) AS "user" FROM (SELECT * FROM "auth"."users" WHERE ((("_root.base"."user_id") = ("id")) AND ((EXISTS (SELECT $33 FROM "public"."users_groups" AS "__be_0_users_groups" WHERE (((("__be_0_users_groups"."user_id") = ("auth"."users"."id")) AND ($34)) AND (($35) AND (((("__be_0_users_groups"."group_id") = ((($1->>$36))::uuid)) AND ($37)) AND ($38)))) )) OR (("auth"."users"."id") = ((($1->>$39))::uuid)))) LIMIT $40 ) AS "_root.or.user.base" ) AS "_root.or.user" ON ($41) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.status.base"."title" AS "title", "_root.or.status.base"."color_id" AS "colorId", "_root.or.status.base"."is_auto" AS "isAuto", "_root.or.status.base"."id" AS "id", "_root.or.status.base"."is_archived" AS "isArchived", $42 AS "__typename" ) AS "_e" ) ) AS "status" FROM (SELECT * FROM "public"."statuses" WHERE ((("_root.base"."status_id") = ("id")) AND (((("public"."statuses"."group_id") = ((($1->>$43))::uuid)) OR ((("public"."statuses"."group_id") IS NULL) AND (((($1->>$44))::uuid) IS NULL))) OR (("public"."statuses"."group_id") IS NULL))) LIMIT $45 ) AS "_root.or.status.base" ) AS "_root.or.status" ON ($46) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.group.base"."id" AS "id", "_root.or.group.base"."name" AS "name", $47 AS "__typename" ) AS "_e" ) ) AS "group" FROM (SELECT * FROM "public"."groups" WHERE ((("_root.base"."group_id") = ("id")) AND (("public"."groups"."id") = ((($1->>$48))::uuid))) LIMIT $49 ) AS "_root.or.group.base" ) AS "_root.or.group" ON ($50) LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("fieldsValues" ORDER BY "root.ar.root.fieldsValues.or.field.pg.created_at" ASC NULLS LAST), $51 ) AS "fieldsValues" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.fieldsValues.base"."id" AS "id", "_root.ar.root.fieldsValues.or.field"."field" AS "field", "_root.ar.root.fieldsValues.or.fieldValue"."fieldValue" AS "fieldValue", "_root.ar.root.fieldsValues.or.location"."location" AS "location", "_root.ar.root.fieldsValues.base"."value" AS "value", $52 AS "__typename" ) AS "_e" ) ) AS "fieldsValues", "_root.ar.root.fieldsValues.or.field"."root.ar.root.fieldsValues.or.field.pg.created_at" AS "root.ar.root.fieldsValues.or.field.pg.created_at" FROM (SELECT * FROM "public"."projects_fieldsvalues" WHERE ((("_root.base"."id") = ("project_id")) AND ((("public"."projects_fieldsvalues"."group_id") = ((($1->>$53))::uuid)) AND ((("public"."projects_fieldsvalues"."deleted_at") IS NULL) AND (((("public"."projects_fieldsvalues"."fieldvalue_id") IS NULL) OR (EXISTS (SELECT $54 FROM "public"."fieldsvalues" AS "__be_0_fieldsvalues" WHERE (((("__be_0_fieldsvalues"."id") = ("public"."projects_fieldsvalues"."fieldvalue_id")) AND ($55)) AND (($56) AND (((("__be_0_fieldsvalues"."deleted_at") IS NULL) AND
|
|
12 min
< 0.1%
|
17 ms
|
42,528
nhost_hasura
|
WITH "_mutres__profiles" AS (INSERT INTO "public"."profiles" ( "member_id", "last_name_parsed", "linkedin_id", "image_id", "summary", "id", "is_hiring", "is_influencer", "public_identifier", "is_premium", "first_name_parsed", "headline", "profile_url", "created_by_userid", "primary_locale", "last_resume_updated_at", "group_id", "is_open_to_new_opportunities" ) VALUES (($1)::text, ($2)::text, ($3)::integer, $4, ($5)::text, ($6)::uuid, ($7)::boolean, ($8)::boolean, ($9)::text, ($10)::boolean, ($11)::text, ($12)::text, ($13)::text, ($14)::uuid, ($15)::text, ($16)::timestamptz, ($17)::uuid, ($18)::boolean) ON CONFLICT ON CONSTRAINT "profiles_pkey" DO UPDATE SET "member_id" = EXCLUDED."member_id","last_name_parsed" = EXCLUDED."last_name_parsed","linkedin_id" = EXCLUDED."linkedin_id","image_id" = EXCLUDED."image_id","summary" = EXCLUDED."summary","is_hiring" = EXCLUDED."is_hiring","is_influencer" = EXCLUDED."is_influencer","public_identifier" = EXCLUDED."public_identifier","is_premium" = EXCLUDED."is_premium","first_name_parsed" = EXCLUDED."first_name_parsed","headline" = EXCLUDED."headline","profile_url" = EXCLUDED."profile_url","primary_locale" = EXCLUDED."primary_locale","last_resume_updated_at" = EXCLUDED."last_resume_updated_at","is_open_to_new_opportunities" = EXCLUDED."is_open_to_new_opportunities" WHERE (((((("public"."profiles"."group_id") = (($19)::uuid)) OR ((("public"."profiles"."group_id") IS NULL) AND ((($20)::uuid) IS NULL))) AND ($21)) AND ($22)) AND ($23)) RETURNING * , CASE WHEN ("public"."profiles"."xmax") = ($24) THEN ($25)::boolean ELSE ((((("public"."profiles"."group_id") = (($26)::uuid)) OR ((("public"."profiles"."group_id") IS NULL) AND ((($27)::uuid) IS NULL))) AND ($28)) AND ($29))::boolean END AS "check__constraint") SELECT json_build_object($30, (SELECT COUNT(*) FROM "_mutres__profiles" ), $31, (SELECT coalesce(json_agg("root" ), $32 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT ("_root.base"."id")::text AS "id", ("_root.base"."created_at")::text AS "created_at", ("_root.base"."updated_at")::text AS "updated_at", ("_root.base"."deleted_at")::text AS "deleted_at", ("_root.base"."member_id")::text AS "member_id", ("_root.base"."first_name_parsed")::text AS "first_name_parsed", ("_root.base"."last_name_parsed")::text AS "last_name_parsed", ("_root.base"."public_identifier")::text AS "public_identifier", ("_root.base"."network_distance_level")::text AS "network_distance_level", ("_root.base"."source")::text AS "source", ("_root.base"."created_by_userid")::text AS "created_by_userid", ("_root.base"."birthday")::text AS "birthday", ("_root.base"."headline")::text AS "headline", ("_root.base"."is_influencer")::text AS "is_influencer", ("_root.base"."is_premium")::text AS "is_premium", ("_root.base"."profile_url")::text AS "profile_url", ("_root.base"."address")::text AS "address", ("_root.base"."linkedin_id")::text AS "linkedin_id", ("_root.base"."job_seeker")::text AS "job_seeker", ("_root.base"."open_link")::text AS "open_link", ("_root.base"."status_id")::text AS "status_id", ("_root.base"."notes")::text AS "notes", ("_root.base"."group_id")::text AS "group_id", ("_root.base"."talent_identifier")::text AS "talent_identifier", ("_root.base"."summary")::text AS "summary", ("_root.base"."added_at")::text AS "added_at", ("_root.base"."search_string")::text AS "search_string", ("_root.base"."can_send_inmail")::text AS "can_send_inmail", ("_root.base"."is_open_to_new_opportunities")::text AS "is_open_to_new_opportunities", ("_root.base"."external_id")::text AS "external_id", ("_root.base"."image_id")::text AS "image_id", ("_root.base"."parsed_location_id")::text AS "parsed_location_id", ("_root.base"."is_hiring")::text AS "is_hiring", ("_root.base"."trigger_count_connexions_with_this_profile")::text AS "trigger_count_connexions_with_this_profile", ("_root.base"."trigger_count_invitations_scheduled_to_this_profile")::text AS "trigger_count_invitations_scheduled_to_this_profile", ("_root.base"."trigger_count_messages_scheduled_to_this_profile")::text AS "trigger_count_messages_scheduled_to_this_profile", ("_root.base"."trigger_last_interaction_type")::text AS "trigger_last_interaction_type", ("_root.base"."trigger_first_interaction_date")::text AS "trigger_first_interaction_date", ("_root.base"."trigger_last_interaction_date")::text AS "trigger_last_interaction_date", ("_root.base"."trigger_count_resumes")::text AS "trigger_count_resumes", ("_root.base"."trigger_count_invitations_sent_to_this_profile")::text AS "trigger_count_invitations_sent_to_this_profile", ("_root.base"."trigger_count_applications_from_this_profile")::text AS "trigger_count_applications_from_this_profile", ("_root.base"."trigger_count_messages_received_from_this_profile")::text AS "trigger_count_messages_received_from_this_profile", ("_root.base"."trigger_count_messages_sent_to_this_profile")::text AS "trigger_count_messages_sent_to_this_profile", ("_root.base"."trigger_status_auto_id")::text AS "trigger_status_auto_id", ("_root.base"."generated_has_resume")::text AS "generated_has_resume", ("_root.base"."primary_locale")::text AS "primary_locale", ("_root.base"."trigger_last_position_start_date")::text AS "trigger_last_position_start_date", ("_root.base"."trigger_count_attached_files")::text AS "trigger_count_attached_files", ("_root.base"."generated_has_attached_files")::text AS "generated_has_attached_files", ("_root.base"."trigger_last_past_interaction_date")::text AS "trigger_last_past_interaction_date", ("_root.base"."added_or_created_at")::text AS "added_or_created_at", ("_root.base"."trigger_duplicates_searched_at")::text AS "trigger_duplicates_searched_at", ("_root.base"."trigger_linkedin_significant_identifier")::text AS "trigger_linkedin_significant_identifier", ("_root.base"."linkedin_sales_navigator_identifier")::text AS "linkedin_sales_navigator_identifier", ("_root.base"."first_name_manual")::text AS "first_name_manual", ("_root.base"."last_name_manual")::text AS "last_name_manual", ("_root.base"."trigger_first_name")::text AS "trigger_first_name", ("_root.base"."trigger_last_name")::text AS "trigger_last_name", ("_root.base"."manual_location_id")::text AS "manual_location_id", ("_root.base"."trigger_location_id")::text AS "trigger_location_id", ("_root.base"."external_id_source")::text AS "external_id_source", ("_root.base"."trigger_is_applicant")::text AS "trigger_is_applicant", ("_root.base"."is_contact")::text AS "is_contact", ("_root.base"."is_talent")::text AS "is_talent", ("_root.base"."last_resume_updated_at")::text AS "last_resume_updated_at", ("_root.base"."is_merged_from_ids")::text AS "is_merged_from_ids", ("_root.base"."id_integer")::text AS "id_integer", ("_root.base"."trigger_short_id")::text AS "trigger_short_id", ("_root.base"."location_ai_run_id")::text AS "location_ai_run_id" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_mutres__profiles" WHERE ($33) ) AS "_root.base" ) AS "_root" ) ) , (SELECT coalesce(bool_and("check__constraint" ), $34 ) FROM "_mutres__profiles" )
|
|
12 min
< 0.1%
|
2 ms
|
312,590
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."name" AS "name", $4 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."schools" WHERE (("public"."schools"."name") = ANY(($2)::text[])) ) AS "_root.base" ) AS "_root"
|
|
12 min
< 0.1%
|
2 ms
|
312,590
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."external_url" AS "externalUrl", $4 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."images" WHERE (("public"."images"."external_url") = ANY(($2)::text[])) LIMIT $5 ) AS "_root.base" ) AS "_root"
|
|
11 min
< 0.1%
|
13 ms
|
47,973
nhost_hasura
|
WITH "_mra__email_addresses" AS (INSERT INTO "public"."email_addresses" ( "email", "user_id", "source", "profile_id", "group_id" ) VALUES (($1)::text, ($2)::uuid, ($3)::text, $4, ($5)::uuid) ON CONFLICT ON CONSTRAINT "email_addresses_source_email_profile_id_key" DO NOTHING RETURNING * , CASE WHEN ("public"."email_addresses"."xmax") = ($6) THEN (((("public"."email_addresses"."group_id") = (($7)::uuid)) AND ($8)) AND ($9))::boolean ELSE (((("public"."email_addresses"."group_id") = (($10)::uuid)) AND ($11)) AND ($12))::boolean END AS "check__constraint"), "_aca__email_addresses" AS (SELECT "email" , "source" , "profile_id" , "company_id" , "group_id" , "created_at" , "updated_at" , "deleted_at" , "id" , "type" , "user_id" , "ai_run_id" FROM "_mra__email_addresses" ) SELECT json_build_object($13, (SELECT COUNT(*) FROM "_aca__email_addresses" ) ) , (SELECT coalesce(bool_and("check__constraint" ), $14 ) FROM "_mra__email_addresses" )
|
|
10 min
< 0.1%
|
63 ms
|
9,743
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."project_id" AS "projectId", "_root.base"."statuses_metrics" AS "statusesMetrics", $4 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."projects_statuses_metrics" WHERE (("public"."projects_statuses_metrics"."id") = (($2)::uuid)) LIMIT $5 ) AS "_root.base" ) AS "_root"
|
|
10 min
< 0.1%
|
1 ms
|
1,069,740
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."profile_id" AS "profileId", "_root.base"."email" AS "email", $5 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."email_addresses" WHERE ((("public"."email_addresses"."group_id") = ((($1->>$6))::uuid)) AND ((("public"."email_addresses"."email") = ANY(($2)::text[])) AND ((("public"."email_addresses"."deleted_at") IS NULL) AND (EXISTS (SELECT $7 FROM "public"."profiles" AS "__be_0_profiles" WHERE (((("__be_0_profiles"."id") = ("public"."email_addresses"."profile_id")) AND ($8)) AND (((((("__be_0_profiles"."group_id") = ((($1->>$9))::uuid)) OR ((("__be_0_profiles"."group_id") IS NULL) AND (((($1->>$10))::uuid) IS NULL))) AND ($11)) AND ($12)) AND (((("__be_0_profiles"."deleted_at") IS NULL) AND ($13)) AND (((("__be_0_profiles"."group_id") = (($3)::uuid)) AND ($14)) AND ($15))))) ))))) LIMIT $16 ) AS "_root.base" ) AS "_root"
|
|
10 min
< 0.1%
|
5 ms
|
125,505
nhost_hasura
|
WITH "_mra__profiles_locales" AS (INSERT INTO "public"."profiles_locales" ( "proficiency", "country", "language", "source", "profile_id" ) VALUES (($1)::text, ($2)::text, ($3)::text, ($4)::text, $5) ON CONFLICT ON CONSTRAINT "profiles_locales_profile_language_source_key" DO UPDATE SET "proficiency" = EXCLUDED."proficiency","country" = EXCLUDED."country" WHERE (((EXISTS (SELECT $6 FROM "public"."profiles" AS "_be_0_profiles" WHERE (((("_be_0_profiles"."id") = ("public"."profiles_locales"."profile_id")) AND ($7)) AND (($8) AND ((((("_be_0_profiles"."group_id") = (($9)::uuid)) OR ((("_be_0_profiles"."group_id") IS NULL) AND ((($10)::uuid) IS NULL))) AND ($11)) AND ($12)))) )) AND ($13)) AND ($14)) RETURNING * , CASE WHEN ("public"."profiles_locales"."xmax") = ($15) THEN ((EXISTS (SELECT $16 FROM "public"."profiles" AS "_be_0_profiles" WHERE (((("_be_0_profiles"."id") = ("public"."profiles_locales"."profile_id")) AND ($17)) AND (($18) AND ((((("_be_0_profiles"."group_id") = (($19)::uuid)) OR ((("_be_0_profiles"."group_id") IS NULL) AND ((($20)::uuid) IS NULL))) AND ($21)) AND ($22)))) )) AND ($23))::boolean ELSE ((EXISTS (SELECT $24 FROM "public"."profiles" AS "_be_0_profiles" WHERE (((("_be_0_profiles"."id") = ("public"."profiles_locales"."profile_id")) AND ($25)) AND (($26) AND ((((("_be_0_profiles"."group_id") = (($27)::uuid)) OR ((("_be_0_profiles"."group_id") IS NULL) AND ((($28)::uuid) IS NULL))) AND ($29)) AND ($30)))) )) AND ($31))::boolean END AS "check__constraint"), "_aca__profiles_locales" AS (SELECT "profile_id" , "language" , "country" , "created_at" , "updated_at" , "deleted_at" , "id" , "source" , "proficiency" , "ai_run_id" FROM "_mra__profiles_locales" ) SELECT json_build_object($32, (SELECT COUNT(*) FROM "_aca__profiles_locales" ) ) , (SELECT coalesce(bool_and("check__constraint" ), $33 ) FROM "_mra__profiles_locales" )
|
|
9 min
< 0.1%
|
0 ms
|
1,765,008
nhost_hasura
|
SELECT coalesce(json_agg("root" ORDER BY "root.pg.name" ASC NULLS LAST, "root.pg.id" ASC NULLS LAST), $2 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."created_at" AS "createdAt", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."description" AS "description", "_root.base"."id" AS "id", "_root.base"."is_made_for_recruitment" AS "isMadeForRecruitment", "_root.base"."is_made_for_sales" AS "isMadeForSales", "_root.base"."is_default_for_sales" AS "isDefaultForSales", "_root.base"."is_default_for_recruitment" AS "isDefaultForRecruitment", "_root.base"."name" AS "name", "_root.base"."updated_at" AS "updatedAt", "_root.base"."fields_ids" AS "fieldsIds", "_root.base"."statuses_ids" AS "statusesIds", $3 AS "__typename" ) AS "_e" ) ) AS "root", "_root.base"."name" AS "root.pg.name", "_root.base"."id" AS "root.pg.id" FROM (SELECT * FROM "public"."presets" WHERE (((("public"."presets"."group_id") IS NULL) OR (("public"."presets"."group_id") = ((($1->>$4))::uuid))) AND (("public"."presets"."deleted_at") IS NULL)) ORDER BY "name" ASC NULLS LAST, "id" ASC NULLS LAST LIMIT $5 OFFSET $6) AS "_root.base" ORDER BY "root.pg.name" ASC NULLS LAST, "root.pg.id" ASC NULLS LAST ) AS "_root"
|
|
9 min
< 0.1%
|
56 ms
|
9,384
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."project_id" AS "projectId", "_root.base"."statuses_metrics" AS "statusesMetrics", $4 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."projects_statuses_metrics" WHERE (("public"."projects_statuses_metrics"."id") = ANY(($2)::uuid[])) ) AS "_root.base" ) AS "_root"
|
|
8 min
< 0.1%
|
5 ms
|
97,199
nhost_hasura
|
SELECT coalesce(json_agg("root" ORDER BY "root.pg.order" ASC NULLS LAST), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."created_at" AS "createdAt", "_root.base"."updated_at" AS "updatedAt", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."name" AS "name", "_root.base"."user_id" AS "userId", "_root.base"."type" AS "type", "_root.base"."order" AS "order", "_root.base"."targeted_entity" AS "targetedEntity", "_root.base"."is_hidden" AS "isHidden", "_root.base"."default_value" AS "defaultValue", "_root.base"."purpose" AS "purpose", "_root.base"."trigger_is_made_for_sales" AS "isMadeForSales", "_root.base"."trigger_is_made_for_recruitment" AS "isMadeForRecruitment", "_root.base"."is_public" AS "isPublic", "_root.base"."is_required" AS "isRequired", "_root.base"."is_expanded_by_default" AS "isExpandedByDefault", "_root.base"."is_optional_on_website" AS "isOptionalOnWebsite", "_root.base"."is_required_on_website" AS "isRequiredOnWebsite", "_root.ar.root.values"."values" AS "values", "_root.base"."parent_id" AS "parentId", "_root.or.parent"."parent" AS "parent", "_root.ar.root.children"."children" AS "children", $5 AS "__typename" ) AS "_e" ) ) AS "root", "_root.base"."order" AS "root.pg.order" FROM (SELECT * FROM "public"."fields" WHERE (((("public"."fields"."group_id") = ((($1->>$6))::uuid)) OR ((("public"."fields"."group_id") IS NULL) AND (((($1->>$7))::uuid) IS NULL))) AND ((("public"."fields"."deleted_at") IS NULL) AND ((("public"."fields"."is_optional_on_website") = (($2)::boolean)) OR (("public"."fields"."is_required_on_website") = (($3)::boolean))))) ORDER BY "order" ASC NULLS LAST ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.parent.base"."id" AS "id", "_root.or.parent.base"."name" AS "name", "_root.or.parent.base"."trigger_is_made_for_sales" AS "isMadeForSales", "_root.or.parent.base"."trigger_is_made_for_recruitment" AS "isMadeForRecruitment", $8 AS "__typename" ) AS "_e" ) ) AS "parent" FROM (SELECT * FROM "public"."fields" WHERE ((("_root.base"."parent_id") = ("id")) AND ((("public"."fields"."group_id") = ((($1->>$9))::uuid)) OR ((("public"."fields"."group_id") IS NULL) AND (((($1->>$10))::uuid) IS NULL)))) LIMIT $11 ) AS "_root.or.parent.base" ) AS "_root.or.parent" ON ($12) LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("children" ORDER BY "root.ar.root.children.pg.order" ASC NULLS LAST), $13 ) AS "children" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.children.base"."id" AS "id", "_root.ar.root.children.base"."created_at" AS "createdAt", "_root.ar.root.children.base"."updated_at" AS "updatedAt", "_root.ar.root.children.base"."deleted_at" AS "deletedAt", "_root.ar.root.children.base"."name" AS "name", "_root.ar.root.children.base"."user_id" AS "userId", "_root.ar.root.children.base"."type" AS "type", "_root.ar.root.children.base"."order" AS "order", "_root.ar.root.children.base"."targeted_entity" AS "targetedEntity", "_root.ar.root.children.base"."is_hidden" AS "isHidden", "_root.ar.root.children.base"."default_value" AS "defaultValue", "_root.ar.root.children.base"."purpose" AS "purpose", "_root.ar.root.children.base"."trigger_is_made_for_sales" AS "isMadeForSales", "_root.ar.root.children.base"."trigger_is_made_for_recruitment" AS "isMadeForRecruitment", "_root.ar.root.children.base"."is_required" AS "isRequired", "_root.ar.root.children.base"."is_expanded_by_default" AS "isExpandedByDefault", "_root.ar.root.children.base"."is_optional_on_website" AS "isOptionalOnWebsite", "_root.ar.root.children.base"."is_required_on_website" AS "isRequiredOnWebsite", "_root.ar.root.children.ar.children.values"."values" AS "values", "_root.ar.root.children.base"."parent_id" AS "parentId", "_root.ar.root.children.or.parent"."parent" AS "parent", $14 AS "__typename" ) AS "_e" ) ) AS "children", "_root.ar.root.children.base"."order" AS "root.ar.root.children.pg.order" FROM (SELECT * FROM "public"."fields" WHERE ((("_root.base"."id") = ("parent_id")) AND (((("public"."fields"."group_id") = ((($1->>$15))::uuid)) OR ((("public"."fields"."group_id") IS NULL) AND (((($1->>$16))::uuid) IS NULL))) AND (("public"."fields"."deleted_at") IS NULL))) ORDER BY "order" ASC NULLS LAST ) AS "_root.ar.root.children.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.children.or.parent.base"."id" AS "id", "_root.ar.root.children.or.parent.base"."name" AS "name", "_root.ar.root.children.or.parent.base"."trigger_is_made_for_sales" AS "isMadeForSales", "_root.ar.root.children.or.parent.base"."trigger_is_made_for_recruitment" AS "isMadeForRecruitment", $17 AS "__typename" ) AS "_e" ) ) AS "parent" FROM (SELECT * FROM "public"."fields" WHERE ((("_root.ar.root.children.base"."parent_id") = ("id")) AND ((("public"."fields"."group_id") = ((($1->>$18))::uuid)) OR ((("public"."fields"."group_id") IS NULL) AND (((($1->>$19))::uuid) IS NULL)))) LIMIT $20 ) AS "_root.ar.root.children.or.parent.base" ) AS "_root.ar.root.children.or.parent" ON ($21) LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("values" ORDER BY "root.ar.root.children.ar.children.values.pg.name" ASC NULLS LAST), $22 ) AS "values" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.children.ar.children.values.base"."id" AS "id", "_root.ar.root.children.ar.children.values.base"."field_id" AS "fieldId", "_root.ar.root.children.ar.children.values.base"."name" AS "name", "_root.ar.root.children.ar.children.values.base"."is_default" AS "isDefault", "_root.ar.root.children.ar.children.values.base"."technical_value" AS "technicalValue", $23 AS "__typename" ) AS "_e" ) ) AS "values", "_root.ar.root.children.ar.children.values.base"."name" AS "root.ar.root.children.ar.children.values.pg.name" FROM (SELECT * FROM "public"."fieldsvalues" WHERE ((("_root.ar.root.children.base"."id") = ("field_id")) AND (("public"."fieldsvalues"."deleted_at") IS NULL)) ORDER BY "name" ASC NULLS LAST ) AS "_root.ar.root.children.ar.children.values.base" ORDER BY "root.ar.root.children.ar.children.values.pg.name" ASC NULLS LAST ) AS "_root.ar.root.children.ar.children.values" ) AS "_root.ar.root.children.ar.children.values" ON ($24) ORDER BY "root.ar.root.children.pg.order" ASC NULLS LAST ) AS "_root.ar.root.children" ) AS "_root.ar.root.children" ON ($25) LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("values" ORDER BY "root.ar.root.values.pg.name" ASC NULLS LAST), $26 ) AS "values" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.values.base"."id" AS "id", "_root.ar.root.values.base"."field_id" AS "fieldId", "_root.ar.root.values.base"."name" AS "name", "_root.ar.root.values.base"."is_default" AS "isDefault", "_root.ar.root.values.base"."technical_value" AS "technicalValue", $27 AS "__typename" ) AS "_e" ) ) AS "values", "_root.ar.root.values.base"."name" AS "root.ar.root.values.pg.name" FROM (SELECT * FROM "public"."fieldsvalues" WHERE ((("_root.base"."id") = ("field_id")) AND (("public"."fieldsvalues"."deleted_at") IS NULL)) ORDER BY "name" ASC NULLS LAST ) AS "_root.ar.root.values.base" ORDER BY "root.ar.root.values.pg.name" ASC NULLS LAST ) AS "_root.ar.root.values" ) AS "_root.ar.root.values" ON ($28) ORDER BY "root.pg.order" ASC NULLS LAST ) AS "_root"
|
|
8 min
< 0.1%
|
2 ms
|
307,381
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."profile_id" AS "profileId", "_root.base"."location_id" AS "locationId", "_root.base"."source" AS "source", "_root.base"."deleted_at" AS "deletedAt", $4 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."profiles_locations" WHERE ((("public"."profiles_locations"."group_id") = ((($1->>$5))::uuid)) AND (("public"."profiles_locations"."profile_id") = ANY(($2)::uuid[]))) ) AS "_root.base" ) AS "_root"
|
|
8 min
< 0.1%
|
0 ms
|
1,743,299
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."public_identifier" AS "publicIdentifier", "_root.base"."talent_identifier" AS "talentIdentifier", "_root.base"."linkedin_sales_navigator_identifier" AS "linkedinSalesNavigatorIdentifier", "_root.base"."member_id" AS "memberId", "_root.base"."linkedin_id" AS "linkedinId", "_root.base"."external_id" AS "externalId", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."trigger_linkedin_significant_identifier" AS "linkedinSignificantIdentifier", $5 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."profiles" WHERE (((("public"."profiles"."group_id") = ((($1->>$6))::uuid)) OR ((("public"."profiles"."group_id") IS NULL) AND (((($1->>$7))::uuid) IS NULL))) AND ((("public"."profiles"."member_id") = ANY(($2)::text[])) OR (("public"."profiles"."trigger_linkedin_significant_identifier") = ANY(($3)::text[])))) ) AS "_root.base" ) AS "_root"
|
|
7 min
< 0.1%
|
1 ms
|
311,544
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."profile_id" AS "profileId", "_root.base"."title" AS "title", "_root.base"."linkedin_company_id" AS "linkedinCompanyId", "_root.base"."company_name" AS "companyName", "_root.base"."start_date" AS "startDate", "_root.base"."end_date" AS "endDate", "_root.base"."location_name" AS "locationName", "_root.base"."employment_type" AS "employmentType", "_root.base"."work_time" AS "workTime", $5 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."profiles_positions" WHERE ((("public"."profiles_positions"."group_id") = ((($1->>$6))::uuid)) AND ((("public"."profiles_positions"."deleted_at") IS NULL) AND ((("public"."profiles_positions"."source") = (($2)::text)) AND (("public"."profiles_positions"."profile_id") = ANY(($3)::uuid[]))))) ) AS "_root.base" ) AS "_root"
|
|
7 min
< 0.1%
|
81 ms
|
5,422
nhost_hasura
|
WITH "_mra__historyentries" AS (INSERT INTO "public"."historyentries" ( "user_id", "deleted_at", "id", "type", "oauth_account_id", "project_id", "external_id", "created_at", "subject", "emailAddress", "message_scheduled_id", "message", "profile_id", "group_id", "external_thread_id", "data" ) VALUES (($1)::uuid, ($2)::timestamptz, ($3)::uuid, ($4)::text, ($5)::text, ($6)::uuid, ($7)::text, ($8)::timestamptz, ($9)::text, ($10)::text, ($11)::uuid, ($12)::text, ($13)::uuid, ($14)::uuid, ($15)::text, ($16)::jsonb) ON CONFLICT ON CONSTRAINT "historyentries_external_id_user_id_profile_id_key" DO UPDATE SET "type" = EXCLUDED."type","oauth_account_id" = EXCLUDED."oauth_account_id","project_id" = EXCLUDED."project_id","external_id" = EXCLUDED."external_id","created_at" = EXCLUDED."created_at","subject" = EXCLUDED."subject","emailAddress" = EXCLUDED."emailAddress","message_scheduled_id" = EXCLUDED."message_scheduled_id","message" = EXCLUDED."message","profile_id" = EXCLUDED."profile_id","external_thread_id" = EXCLUDED."external_thread_id","data" = EXCLUDED."data" WHERE (((((((("public"."historyentries"."group_id") = (($17)::uuid)) OR ((("public"."historyentries"."group_id") IS NULL) AND ((($18)::uuid) IS NULL))) AND ($19)) AND ($20)) AND ((((("public"."historyentries"."trigger_is_confidentiality_forced") = (($21)::boolean)) AND ($22)) AND ($23)) AND ($24))) AND ($25)) AND ($26)) RETURNING * , CASE WHEN ("public"."historyentries"."xmax") = ($27) THEN ((((((("public"."historyentries"."group_id") = (($28)::uuid)) OR ((("public"."historyentries"."group_id") IS NULL) AND ((($29)::uuid) IS NULL))) AND ($30)) AND ($31)) AND (((EXISTS (SELECT $32 FROM "public"."profiles" AS "_be_0_profiles" WHERE (((("_be_0_profiles"."id") = ("public"."historyentries"."profile_id")) AND ($33)) AND (($34) AND ((((("_be_0_profiles"."group_id") = (($35)::uuid)) OR ((("_be_0_profiles"."group_id") IS NULL) AND ((($36)::uuid) IS NULL))) AND ($37)) AND ($38)))) )) AND ($39)) AND ($40))) AND ($41))::boolean ELSE ((((("public"."historyentries"."group_id") = (($42)::uuid)) OR ((("public"."historyentries"."group_id") IS NULL) AND ((($43)::uuid) IS NULL))) AND ($44)) AND ($45))::boolean END AS "check__constraint"), "_aca__historyentries" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "profile_id" , "user_id" , "type" , "data" , "message" , "metadata" , "subject" , "external_id" , "external_thread_id" , "event_start_at" , "event_end_at" , "emailAddress" , "sender_user_id" , "linkedin_seat_id" , "is_manually_created" , "project_id" , "message_scheduled_id" , "jobboard_offer_id" , "group_id" , "trigger_occurred_at" , "source" , "should_notify_jobboard_on_change" , "sub_type_id" , "tags" , "phone_number" , "is_merged_from_id" , "recording_id" , "draft_created_at" , "oauth_account_id" , "trigger_confidentiality_forced" , "trigger_is_confidentiality_forced" FROM "_mra__historyentries" ) SELECT json_build_object($46, (SELECT COUNT(*) FROM "_aca__historyentries" ), $47, (SELECT coalesce(json_agg("root" ), $48 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", $49 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__historyentries" WHERE ($50) ) AS "_root.base" ) AS "_root" ), $51, $52 ) , (SELECT coalesce(bool_and("check__constraint" ), $53 ) FROM "_mra__historyentries" )
|
|
7 min
< 0.1%
|
14 ms
|
30,639
nhost_hasura
|
SELECT coalesce(json_agg("root" ORDER BY "root.pg.order" ASC NULLS LAST, "root.pg.id" ASC NULLS LAST), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."created_at" AS "createdAt", "_root.base"."updated_at" AS "updatedAt", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."name" AS "name", "_root.base"."user_id" AS "userId", "_root.base"."type" AS "type", "_root.base"."order" AS "order", "_root.base"."targeted_entity" AS "targetedEntity", "_root.base"."is_hidden" AS "isHidden", "_root.base"."default_value" AS "defaultValue", "_root.base"."purpose" AS "purpose", "_root.base"."trigger_is_made_for_sales" AS "isMadeForSales", "_root.base"."trigger_is_made_for_recruitment" AS "isMadeForRecruitment", "_root.base"."is_public" AS "isPublic", "_root.base"."is_required" AS "isRequired", "_root.base"."is_expanded_by_default" AS "isExpandedByDefault", "_root.base"."is_optional_on_website" AS "isOptionalOnWebsite", "_root.base"."is_required_on_website" AS "isRequiredOnWebsite", "_root.ar.root.values"."values" AS "values", "_root.base"."parent_id" AS "parentId", "_root.or.parent"."parent" AS "parent", "_root.ar.root.children"."children" AS "children", $5 AS "__typename" ) AS "_e" ) ) AS "root", "_root.base"."order" AS "root.pg.order", "_root.base"."id" AS "root.pg.id" FROM (SELECT * FROM "public"."fields" WHERE (((("public"."fields"."group_id") = ((($1->>$6))::uuid)) OR ((("public"."fields"."group_id") IS NULL) AND (((($1->>$7))::uuid) IS NULL))) AND ((("public"."fields"."deleted_at") IS NULL) AND ((("public"."fields"."parent_id") IS NULL) OR ((("public"."fields"."group_id") = (($2)::uuid)) OR (("public"."fields"."type") = (($3)::text)))))) ORDER BY "order" ASC NULLS LAST, "id" ASC NULLS LAST LIMIT $8 OFFSET $9) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.parent.base"."id" AS "id", "_root.or.parent.base"."name" AS "name", "_root.or.parent.base"."trigger_is_made_for_sales" AS "isMadeForSales", "_root.or.parent.base"."trigger_is_made_for_recruitment" AS "isMadeForRecruitment", $10 AS "__typename" ) AS "_e" ) ) AS "parent" FROM (SELECT * FROM "public"."fields" WHERE ((("_root.base"."parent_id") = ("id")) AND ((("public"."fields"."group_id") = ((($1->>$11))::uuid)) OR ((("public"."fields"."group_id") IS NULL) AND (((($1->>$12))::uuid) IS NULL)))) LIMIT $13 ) AS "_root.or.parent.base" ) AS "_root.or.parent" ON ($14) LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("children" ORDER BY "root.ar.root.children.pg.order" ASC NULLS LAST), $15 ) AS "children" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.children.base"."id" AS "id", "_root.ar.root.children.base"."created_at" AS "createdAt", "_root.ar.root.children.base"."updated_at" AS "updatedAt", "_root.ar.root.children.base"."deleted_at" AS "deletedAt", "_root.ar.root.children.base"."name" AS "name", "_root.ar.root.children.base"."user_id" AS "userId", "_root.ar.root.children.base"."type" AS "type", "_root.ar.root.children.base"."order" AS "order", "_root.ar.root.children.base"."targeted_entity" AS "targetedEntity", "_root.ar.root.children.base"."is_hidden" AS "isHidden", "_root.ar.root.children.base"."default_value" AS "defaultValue", "_root.ar.root.children.base"."purpose" AS "purpose", "_root.ar.root.children.base"."trigger_is_made_for_sales" AS "isMadeForSales", "_root.ar.root.children.base"."trigger_is_made_for_recruitment" AS "isMadeForRecruitment", "_root.ar.root.children.base"."is_required" AS "isRequired", "_root.ar.root.children.base"."is_expanded_by_default" AS "isExpandedByDefault", "_root.ar.root.children.base"."is_optional_on_website" AS "isOptionalOnWebsite", "_root.ar.root.children.base"."is_required_on_website" AS "isRequiredOnWebsite", "_root.ar.root.children.ar.children.values"."values" AS "values", "_root.ar.root.children.base"."parent_id" AS "parentId", "_root.ar.root.children.or.parent"."parent" AS "parent", $16 AS "__typename" ) AS "_e" ) ) AS "children", "_root.ar.root.children.base"."order" AS "root.ar.root.children.pg.order" FROM (SELECT * FROM "public"."fields" WHERE ((("_root.base"."id") = ("parent_id")) AND (((("public"."fields"."group_id") = ((($1->>$17))::uuid)) OR ((("public"."fields"."group_id") IS NULL) AND (((($1->>$18))::uuid) IS NULL))) AND (("public"."fields"."deleted_at") IS NULL))) ORDER BY "order" ASC NULLS LAST ) AS "_root.ar.root.children.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.children.or.parent.base"."id" AS "id", "_root.ar.root.children.or.parent.base"."name" AS "name", "_root.ar.root.children.or.parent.base"."trigger_is_made_for_sales" AS "isMadeForSales", "_root.ar.root.children.or.parent.base"."trigger_is_made_for_recruitment" AS "isMadeForRecruitment", $19 AS "__typename" ) AS "_e" ) ) AS "parent" FROM (SELECT * FROM "public"."fields" WHERE ((("_root.ar.root.children.base"."parent_id") = ("id")) AND ((("public"."fields"."group_id") = ((($1->>$20))::uuid)) OR ((("public"."fields"."group_id") IS NULL) AND (((($1->>$21))::uuid) IS NULL)))) LIMIT $22 ) AS "_root.ar.root.children.or.parent.base" ) AS "_root.ar.root.children.or.parent" ON ($23) LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("values" ORDER BY "root.ar.root.children.ar.children.values.pg.name" ASC NULLS LAST), $24 ) AS "values" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.children.ar.children.values.base"."id" AS "id", "_root.ar.root.children.ar.children.values.base"."field_id" AS "fieldId", "_root.ar.root.children.ar.children.values.base"."name" AS "name", "_root.ar.root.children.ar.children.values.base"."is_default" AS "isDefault", "_root.ar.root.children.ar.children.values.base"."technical_value" AS "technicalValue", $25 AS "__typename" ) AS "_e" ) ) AS "values", "_root.ar.root.children.ar.children.values.base"."name" AS "root.ar.root.children.ar.children.values.pg.name" FROM (SELECT * FROM "public"."fieldsvalues" WHERE ((("_root.ar.root.children.base"."id") = ("field_id")) AND (("public"."fieldsvalues"."deleted_at") IS NULL)) ORDER BY "name" ASC NULLS LAST ) AS "_root.ar.root.children.ar.children.values.base" ORDER BY "root.ar.root.children.ar.children.values.pg.name" ASC NULLS LAST ) AS "_root.ar.root.children.ar.children.values" ) AS "_root.ar.root.children.ar.children.values" ON ($26) ORDER BY "root.ar.root.children.pg.order" ASC NULLS LAST ) AS "_root.ar.root.children" ) AS "_root.ar.root.children" ON ($27) LEFT OUTER JOIN LATERAL (SELECT coalesce(json_agg("values" ORDER BY "root.ar.root.values.pg.name" ASC NULLS LAST), $28 ) AS "values" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.ar.root.values.base"."id" AS "id", "_root.ar.root.values.base"."field_id" AS "fieldId", "_root.ar.root.values.base"."name" AS "name", "_root.ar.root.values.base"."is_default" AS "isDefault", "_root.ar.root.values.base"."technical_value" AS "technicalValue", $29 AS "__typename" ) AS "_e" ) ) AS "values", "_root.ar.root.values.base"."name" AS "root.ar.root.values.pg.name" FROM (SELECT * FROM "public"."fieldsvalues" WHERE ((("_root.base"."id") = ("field_id")) AND (("public"."fieldsvalues"."deleted_at") IS NULL)) ORDER BY "name" ASC NULLS LAST ) AS "_root.ar.root.values.base" ORDER BY "root.ar.root.values.pg.name" ASC NULLS LAST ) AS "_root.ar.root.values" ) AS "_root.ar.root.values" ON ($30) ORDER BY "root.pg.order" ASC NULLS LAST, "root.pg.id" ASC NULLS LAST ) AS "_root"
|
|
7 min
< 0.1%
|
0 ms
|
3,303,562
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $3 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."data" AS "data", "_root.base"."type" AS "type", "_root.base"."refresh_token" AS "refreshToken", "_root.base"."expire_at" AS "expireAt", "_root.base"."access_token_expires_at" AS "accessTokenExpiresAt", "_root.base"."refresh_token_expires_at" AS "refreshTokenExpiresAt", "_root.base"."user_id" AS "userId", "_root.base"."access_token" AS "accessToken", "_root.base"."account_id" AS "accountId", "_root.base"."is_primary" AS "isPrimary", "_root.base"."is_connected" AS "isConnected", "_root.base"."disconnected_at" AS "disconnectedAt", "_root.base"."external_id" AS "externalId", "_root.base"."provider" AS "provider", "_root.base"."trigger_short_id" AS "shortId", "_root.base"."has_access_to_emails" AS "hasAccessToEmails", "_root.base"."has_access_to_calendars" AS "hasAccessToCalendars", "_root.base"."has_access_to_sms" AS "hasAccessToSms", "_root.base"."has_access_to_phone" AS "hasAccessToPhone", "_root.base"."allow_messages_sync" AS "allowMessagesSync", "_root.base"."allow_inmails_sync" AS "allowInmailsSync", "_root.base"."nylas_signature_id" AS "nylasSignatureId", "_root.base"."nylas_signature_synced_at" AS "nylasSignatureSyncedAt", "_root.base"."ringcentral_main_number" AS "ringcentralMainNumber", "_root.or.user"."user" AS "user", $4 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."users_oauth" WHERE ((("public"."users_oauth"."user_id") = ((($1->>$5))::uuid)) AND (("public"."users_oauth"."user_id") = (($2)::uuid))) LIMIT $6 ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.user.base"."display_name" AS "displayName", "_root.or.user.base"."avatar_url" AS "avatarUrl", $7 AS "__typename" ) AS "_e" ) ) AS "user" FROM (SELECT * FROM "auth"."users" WHERE ((("_root.base"."user_id") = ("id")) AND ((EXISTS (SELECT $8 FROM "public"."users_groups" AS "__be_0_users_groups" WHERE (((("__be_0_users_groups"."user_id") = ("auth"."users"."id")) AND ($9)) AND (($10) AND (((("__be_0_users_groups"."group_id") = ((($1->>$11))::uuid)) AND ($12)) AND ($13)))) )) OR (("auth"."users"."id") = ((($1->>$14))::uuid)))) LIMIT $15 ) AS "_root.or.user.base" ) AS "_root.or.user" ON ($16) ) AS "_root"
|
|
7 min
< 0.1%
|
1 ms
|
776,297
nhost_hasura
|
WITH cte AS
( UPDATE hdb_catalog.hdb_cron_events
SET status = $2
WHERE id IN ( SELECT t.id
FROM hdb_catalog.hdb_cron_events t
WHERE ( t.status = $3
and (
(t.next_retry_at is NULL and t.scheduled_time <= now()) or
(t.next_retry_at is not NULL and t.next_retry_at <= now())
)
) AND trigger_name = ANY($1)
FOR UPDATE SKIP LOCKED
)
RETURNING *
)
SELECT row_to_json(t.*) FROM cte AS t
|
|
7 min
< 0.1%
|
4 ms
|
107,841
nhost_hasura
|
WITH "_mra__tasks" AS (INSERT INTO "public"."tasks" ( "user_id", "status", "type", "since", "priority", "parameters", "project_id", "group_id" ) VALUES (($1)::uuid, ($2)::text, ($3)::text, ($4)::timestamptz, ($5)::numeric, ($6)::jsonb, ($7)::uuid, ($8)::uuid) RETURNING * , ($9)::boolean AS "check__constraint"), "_aca__tasks" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "type" , "status" , "parameters" , "return" , "user_id" , "retries" , "group_id" , "done_at" , "priority" , "return_status_code" , "profile_id" , "project_id" , "email_address" , "message_scheduled_id" , "linkedin_seat_id" , "file_id" , "external_id" , "oauth_account_id" , "version" , "since" , "duration" , "user_id_or_group_id" , "historyentry_id" , "phone_number_provider_id" , "retry_at" , "trigger_id" , "trigger_worker_type" , "recording_id" , "resume_when" , "skip_extension_queue_and_execute_immediately" , "cancel_at" , "dashboard_id" FROM "_mra__tasks" ) SELECT (SELECT coalesce((json_agg("root" )->$10), $11 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."status" AS "status", "_root.base"."type" AS "type", "_root.base"."profile_id" AS "profileId", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", $12 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__tasks" WHERE ($13) ) AS "_root.base" ) AS "_root" ) , (SELECT coalesce(bool_and("check__constraint" ), $14 ) FROM "_mra__tasks" )
|
|
6 min
< 0.1%
|
3 ms
|
114,955
nhost_hasura
|
WITH "_mra__tasks" AS (INSERT INTO "public"."tasks" ( "user_id", "status", "type", "since", "priority", "parameters", "group_id" ) VALUES (($1)::uuid, ($2)::text, ($3)::text, ($4)::timestamptz, ($5)::numeric, ($6)::jsonb, ($7)::uuid) RETURNING * , ($8)::boolean AS "check__constraint"), "_aca__tasks" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "type" , "status" , "parameters" , "return" , "user_id" , "retries" , "group_id" , "done_at" , "priority" , "return_status_code" , "profile_id" , "project_id" , "email_address" , "message_scheduled_id" , "linkedin_seat_id" , "file_id" , "external_id" , "oauth_account_id" , "version" , "since" , "duration" , "user_id_or_group_id" , "historyentry_id" , "phone_number_provider_id" , "retry_at" , "trigger_id" , "trigger_worker_type" , "recording_id" , "resume_when" , "skip_extension_queue_and_execute_immediately" , "cancel_at" , "dashboard_id" FROM "_mra__tasks" ) SELECT (SELECT coalesce((json_agg("root" )->$9), $10 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."status" AS "status", "_root.base"."type" AS "type", "_root.base"."profile_id" AS "profileId", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", $11 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__tasks" WHERE ($12) ) AS "_root.base" ) AS "_root" ) , (SELECT coalesce(bool_and("check__constraint" ), $13 ) FROM "_mra__tasks" )
|
|
6 min
< 0.1%
|
59 ms
|
6,456
nhost_hasura
|
SELECT coalesce(json_agg("root" ORDER BY "root.pg.created_at" DESC NULLS LAST, "root.pg.id" ASC NULLS LAST), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."created_at" AS "createdAt", "_root.base"."updated_at" AS "updatedAt", "_root.base"."deleted_at" AS "deletedAt", "_root.base"."read_at" AS "readAt", "_root.base"."type" AS "type", "_root.base"."user_id" AS "userId", "_root.or.profile"."profile" AS "profile", "_root.or.messageScheduled"."messageScheduled" AS "messageScheduled", "_root.or.historyEntry"."historyEntry" AS "historyEntry", $5 AS "__typename" ) AS "_e" ) ) AS "root", "_root.base"."created_at" AS "root.pg.created_at", "_root.base"."id" AS "root.pg.id" FROM (SELECT * FROM "public"."notifications" WHERE ((("public"."notifications"."group_id") = ((($1->>$6))::uuid)) AND ((("public"."notifications"."deleted_at") IS NULL) AND ((("public"."notifications"."type") = (($2)::text)) AND (((("public"."notifications"."deleted_at") IS NULL) AND (EXISTS (SELECT $7 FROM "public"."profiles" AS "__be_0_profiles" WHERE (((("__be_0_profiles"."id") = ("public"."notifications"."profile_id")) AND ($8)) AND (((((("__be_0_profiles"."group_id") = ((($1->>$9))::uuid)) OR ((("__be_0_profiles"."group_id") IS NULL) AND (((($1->>$10))::uuid) IS NULL))) AND ($11)) AND ($12)) AND (((("__be_0_profiles"."deleted_at") IS NULL) AND ($13)) AND ($14)))) ))) AND ((("public"."notifications"."user_id") = (($3)::uuid)) AND (("public"."notifications"."read_at") IS NULL)))))) ORDER BY "created_at" DESC NULLS LAST, "id" ASC NULLS LAST LIMIT $15 OFFSET $16) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.historyEntry.base"."id" AS "id", "_root.or.historyEntry.base"."type" AS "type", "_root.or.historyEntry.base"."trigger_occurred_at" AS "occurredAt", "_root.or.historyEntry.base"."source" AS "source", "public"."historyentries_message_with_confidentiality_settings"("_root.or.historyEntry.base", "hasura_session" => $1) AS "messageWithConfidentialitySettings", "public"."historyentries_subject_with_confidentiality_settings"("_root.or.historyEntry.base", "hasura_session" => $1) AS "subjectWithConfidentialitySettings", "_root.or.historyEntry.or.project"."project" AS "project", "_root.or.historyEntry.ar.historyEntry.files"."files" AS "files", $17 AS "__typename" ) AS "_e" ) ) AS "historyEntry" FROM (SELECT * FROM "public"."historyentries" WHERE ((("_root.base"."historyentry_id") = ("id")) AND (((("public"."historyentries"."group_id") = ((($1->>$18))::uuid)) OR ((("public"."historyentries"."group_id") IS NULL) AND (((($1->>$19))::uuid) IS NULL))) AND (("public"."historyentries"."trigger_is_confidentiality_forced") = (($20)::boolean)))) LIMIT $21 ) AS "_root.or.historyEntry.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.historyEntry.or.project.base"."id" AS "id", "_root.or.historyEntry.or.project.base"."name" AS "name", "_root.or.historyEntry.or.project.or.company"."company" AS "company", $22 AS "__typename" ) AS "_e" ) ) AS "project" FROM (SELECT * FROM "public"."projects" WHERE ((("_root.or.historyEntry.base"."project_id") = ("id")) AND ((("public"."projects"."group_id") = ((($1->>$23))::uuid)) OR ((("public"."projects"."group_id") IS NULL) AND (((($1->>$24))::uuid) IS NULL)))) LIMIT $25 ) AS "_root.or.historyEntry.or.project.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.historyEntry.or.project.or.company.base"."id" AS "id", "md5_077948e7bbff295097ff401783cb3f33__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData"."linkedinCompanyData" AS "linkedinCompanyData", $26 AS "__typename" ) AS "_e" ) ) AS "company" FROM (SELECT * FROM "public"."companies" WHERE ((("_root.or.historyEntry.or.project.base"."company_id") = ("id")) AND (("public"."companies"."group_id") = ((($1->>$27))::uuid))) LIMIT $28 ) AS "_root.or.historyEntry.or.project.or.company.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "md5_17543089adf72f49b3baaef6b1428de7__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.base"."id" AS "id", "md5_17543089adf72f49b3baaef6b1428de7__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.base"."name" AS "name", "md5_842292468fab93732a798efc38bc0209__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.or.image"."image" AS "image", $29 AS "__typename" ) AS "_e" ) ) AS "linkedinCompanyData" FROM (SELECT * FROM "public"."linkedin_companies_data" WHERE (("_root.or.historyEntry.or.project.or.company.base"."linkedin_company_id") = ("id")) LIMIT $30 ) AS "md5_17543089adf72f49b3baaef6b1428de7__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "md5_ec3723e1a27bd9103837f6711a574140__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.or.image.base"."id" AS "id", "md5_ec3723e1a27bd9103837f6711a574140__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.or.image.base"."file_id" AS "fileId", "public"."images_public_url"("md5_ec3723e1a27bd9103837f6711a574140__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.or.image.base") AS "publicUrl", $31 AS "__typename" ) AS "_e" ) ) AS "image" FROM (SELECT * FROM "public"."images" WHERE (("md5_17543089adf72f49b3baaef6b1428de7__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.base"."image_id") = ("id")) LIMIT $32 ) AS "md5_ec3723e1a27bd9103837f6711a574140__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.or.image.base" ) AS "md5_842292468fab93732a798efc38bc0209__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData.or.image" ON ($33) ) AS "md5_077948e7bbff295097ff401783cb3f33__root.or.historyEntry.or.project.or.company.or.linkedinCompanyData" ON ($34) ) AS "_root.or.historyEntry.or.project.or.company" ON ($35) ) AS "_root.or.historyEntry.or.project" ON ($36) LEFT OUTER JOIN LATERAL (SELECT (SELECT coalesce(json_agg("_sub_query"."files" ORDER BY "ob_col_1" ASC NULLS LAST), $37 ) FROM (SELECT "_unnest_table"."files" AS "files", "_unnest_table"."ob_col_1" AS "ob_col_1" FROM UNNEST(array_agg("files" ), array_agg("root.or.historyEntry.ar.historyEntry.files.pg.created_at" )) AS "_unnest_table"("files", "ob_col_1") ORDER BY "ob_col_1" ASC NULLS LAST LIMIT $38 ) AS "_sub_query" ) AS "files" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.historyEntry.ar.historyEntry.files.base"."file_id" AS "fileId", "_root.or.historyEntry.ar.historyEntry.files.base"."created_at" AS "createdAt", "_root.or.historyEntry.ar.historyEntry.files.base"."updated_at" AS "updatedAt", "_root.or.historyEntry.ar.historyEntry.files.or.file"."file" AS "file", $39 AS "__typename" ) AS "_e" ) ) AS "files", "_root.or.historyEntry.ar.historyEntry.files.base"."created_at" AS "root.or.historyEntry.ar.historyEntry.files.pg.created_at" FROM (SELECT * FROM "public"."historyentries_files" WHERE ((("_root.or.historyEntry.base"."id") = ("historyentry_id")) AND ((EXISTS (SELECT $40 FROM "public"."historyentries" AS "__be_0_historyentries" WHERE (((("__be_0_historyentries"."id") = ("public"."historyentries_files"."historyentry_id")) AND ($41)) AND (($42) AND ((((("__be_0_historyentries"."group_id") = ((($1->>$43))::uuid)) OR ((("__be_0_historyentries"."group_id") IS NULL) AND (((($1->>$44))::uuid) IS NULL))) AND ($45)) AND ($46)))) )) AND (("public"."historyentries_files"."deleted_at") IS NULL))) ORDER BY "created_at" ASC NULLS LAST ) AS "_root.or.historyEntry.ar.historyEntry.files.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.historyEntry.ar.historyEntry.files.or.file.base"."id" AS "id", "_root.or.historyEntry.ar.historyEntry.files.or.file.base"."name" AS "name", "_root.or.historyEntry.ar.historyEntry.files.or.file.base"."size" AS "size", "_root.or.historyEntry.ar.historyEntry.files.or.file.base"."mime_type" AS "mimeType", $47 AS "__typename" ) AS "_e" ) ) AS "file" FROM (SELECT * FROM "storage"."files" WHERE (("_root.or.historyEntry.ar.historyEntry.files.base"."file_id") = ("id")) LIMIT $48 ) AS "_root.or.historyEntry.ar.historyEntry.files.or.file.base" ) AS "_root.or.historyEntry.ar.historyEntry.files.or.file" ON ($49) ORDER BY "root.or.historyEntry.ar.historyEntry.files.pg.created_at" ASC NULLS LAST ) AS "_root.or.historyEntry.ar.historyEntry.files" ) AS "_root.or.historyEntry.ar.historyEntry.files" ON ($50) ) AS "_root.or.historyEntry" ON ($51) LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.profile.base"."id" AS "id", "_root.or.profile.base"."trigger_first_name" AS "firstName", "_root.or.profile.base"."trigger_last_name" AS "lastName", "_root.or.profile.base"."source" AS "source", "_root.or.profile.or.image"."image" AS "image", "_root.or.profile.ar.profile.files"."files" AS "files", "_root.or.profile.base"."status_id" AS "statusId", "_root.or.profile.base"."is_contact" AS "isContact", "_root.or.profile.base"."is_talent" AS "isTalent", "_root.or.profile.ar.profile.associations"."associations" AS "associations", $52 AS "__typename" ) AS "_e" ) ) AS "profile" FROM (SELECT * FROM "public"."profiles" WHERE ((("_root.base"."profile_id") = ("id")) AND ((("public"."profiles"."group_id") = ((($1->>$53))::uuid)) OR ((("public"."profiles"."group_id") IS NULL) AND (((($1->>$54))::uuid) IS NULL)))) LIMIT $55 ) AS "_root.or.profile.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.profile.or.image.base"."id" AS "id", "_root.or.profile.or.image.base"."file_id" AS "fileId", "public"."images_public_url"("_root.or.profile.or.image.base") AS "publicUrl",
|
|
6 min
< 0.1%
|
0 ms
|
8,259,904
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."display_name" AS "displayName", "_root.or.group"."group" AS "group", $5 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "auth"."users" WHERE ((("auth"."users"."disabled") = (($2)::boolean)) AND (EXISTS (SELECT $6 FROM "public"."users_oauth" AS "__be_0_users_oauth" WHERE (((("__be_0_users_oauth"."user_id") = ("auth"."users"."id")) AND ($7)) AND (($8) AND (((("__be_0_users_oauth"."external_id") = (($3)::text)) AND ($9)) AND ($10)))) ))) ) AS "_root.base" LEFT OUTER JOIN LATERAL (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.or.group.base"."group_id" AS "groupId", $11 AS "__typename" ) AS "_e" ) ) AS "group" FROM (SELECT * FROM "public"."users_groups" WHERE (("_root.base"."id") = ("user_id")) LIMIT $12 ) AS "_root.or.group.base" ) AS "_root.or.group" ON ($13) ) AS "_root"
|
|
6 min
< 0.1%
|
43 ms
|
8,728
nhost_hasura
|
WITH "_mra__historyentries" AS (INSERT INTO "public"."historyentries" ( "user_id", "deleted_at", "type", "external_id", "created_at", "profile_id", "group_id" ) VALUES (($1)::uuid, ($2)::timestamptz, ($3)::text, ($4)::text, ($5)::timestamptz, $6, ($7)::uuid) ON CONFLICT ON CONSTRAINT "historyentries_external_id_user_id_profile_id_key" DO UPDATE SET "deleted_at" = EXCLUDED."deleted_at","type" = EXCLUDED."type" WHERE (((((((("public"."historyentries"."group_id") = (($8)::uuid)) OR ((("public"."historyentries"."group_id") IS NULL) AND ((($9)::uuid) IS NULL))) AND ($10)) AND ($11)) AND ((((("public"."historyentries"."trigger_is_confidentiality_forced") = (($12)::boolean)) AND ($13)) AND ($14)) AND ($15))) AND ($16)) AND ($17)) RETURNING * , CASE WHEN ("public"."historyentries"."xmax") = ($18) THEN ((((((("public"."historyentries"."group_id") = (($19)::uuid)) OR ((("public"."historyentries"."group_id") IS NULL) AND ((($20)::uuid) IS NULL))) AND ($21)) AND ($22)) AND (((EXISTS (SELECT $23 FROM "public"."profiles" AS "_be_0_profiles" WHERE (((("_be_0_profiles"."id") = ("public"."historyentries"."profile_id")) AND ($24)) AND (($25) AND ((((("_be_0_profiles"."group_id") = (($26)::uuid)) OR ((("_be_0_profiles"."group_id") IS NULL) AND ((($27)::uuid) IS NULL))) AND ($28)) AND ($29)))) )) AND ($30)) AND ($31))) AND ($32))::boolean ELSE ((((("public"."historyentries"."group_id") = (($33)::uuid)) OR ((("public"."historyentries"."group_id") IS NULL) AND ((($34)::uuid) IS NULL))) AND ($35)) AND ($36))::boolean END AS "check__constraint"), "_aca__historyentries" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "profile_id" , "user_id" , "type" , "data" , "message" , "metadata" , "subject" , "external_id" , "external_thread_id" , "event_start_at" , "event_end_at" , "emailAddress" , "sender_user_id" , "linkedin_seat_id" , "is_manually_created" , "project_id" , "message_scheduled_id" , "jobboard_offer_id" , "group_id" , "trigger_occurred_at" , "source" , "should_notify_jobboard_on_change" , "sub_type_id" , "tags" , "phone_number" , "is_merged_from_id" , "recording_id" , "draft_created_at" , "oauth_account_id" , "trigger_confidentiality_forced" , "trigger_is_confidentiality_forced" FROM "_mra__historyentries" ) SELECT json_build_object($37, (SELECT COUNT(*) FROM "_aca__historyentries" ) ) , (SELECT coalesce(bool_and("check__constraint" ), $38 ) FROM "_mra__historyentries" )
|
|
6 min
< 0.1%
|
1 ms
|
280,289
nhost_hasura
|
SELECT coalesce(json_agg("root" ), $4 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."profile_id" AS "profileId", "_root.base"."name" AS "name", $5 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "public"."profiles_skills" WHERE ((("public"."profiles_skills"."group_id") = ((($1->>$6))::uuid)) AND ((("public"."profiles_skills"."deleted_at") IS NULL) AND ((("public"."profiles_skills"."source") = (($2)::text)) AND (("public"."profiles_skills"."profile_id") = ANY(($3)::uuid[]))))) LIMIT $7 ) AS "_root.base" ) AS "_root"
|
|
6 min
< 0.1%
|
0 ms
|
32,559,720
nhost_hasura
|
UPDATE hdb_catalog.event_log
SET delivered = $2, next_retry_at = $3, locked = $4
WHERE id = $1
|
|
6 min
< 0.1%
|
6 ms
|
55,075
nhost_hasura
|
WITH "_mra__tasks" AS (INSERT INTO "public"."tasks" ( "user_id", "linkedin_seat_id", "status", "type", "oauth_account_id", "since", "retries", "priority", "parameters", "project_id", "external_id", "profile_id", "group_id" ) VALUES (($1)::uuid, ($2)::integer, ($3)::text, ($4)::text, ($5)::text, ($6)::timestamptz, ($7)::integer, ($8)::numeric, ($9)::jsonb, ($10)::uuid, ($11)::text, ($12)::uuid, ($13)::uuid) RETURNING * , ($14)::boolean AS "check__constraint"), "_aca__tasks" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "type" , "status" , "parameters" , "return" , "user_id" , "retries" , "group_id" , "done_at" , "priority" , "return_status_code" , "profile_id" , "project_id" , "email_address" , "message_scheduled_id" , "linkedin_seat_id" , "file_id" , "external_id" , "oauth_account_id" , "version" , "since" , "duration" , "user_id_or_group_id" , "historyentry_id" , "phone_number_provider_id" , "retry_at" , "trigger_id" , "trigger_worker_type" , "recording_id" , "resume_when" , "skip_extension_queue_and_execute_immediately" , "cancel_at" , "dashboard_id" FROM "_mra__tasks" ) SELECT (SELECT coalesce((json_agg("root" )->$15), $16 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."status" AS "status", "_root.base"."type" AS "type", "_root.base"."profile_id" AS "profileId", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", $17 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__tasks" WHERE ($18) ) AS "_root.base" ) AS "_root" ) , (SELECT coalesce(bool_and("check__constraint" ), $19 ) FROM "_mra__tasks" )
|
|
6 min
< 0.1%
|
43 ms
|
7,820
nhost_hasura
|
WITH "_mra__profiles_associations" AS (INSERT INTO "public"."profiles_associations" ( "user_id", "deleted_at", "project_id", "association_type", "status_id", "profile_id", "group_id" ) VALUES (($1)::uuid, ($2)::timestamptz, ($3)::uuid, ($4)::text, ($5)::uuid, ($6)::uuid, ($7)::uuid) ON CONFLICT ON CONSTRAINT "profiles_projects_pkey" DO UPDATE SET "deleted_at" = EXCLUDED."deleted_at","status_id" = EXCLUDED."status_id" WHERE ((((("public"."profiles_associations"."group_id") = (($8)::uuid)) AND ($9)) AND ($10)) AND ($11)) RETURNING * , CASE WHEN ("public"."profiles_associations"."xmax") = ($12) THEN ((((EXISTS (SELECT $13 FROM "public"."projects" AS "_be_0_projects" WHERE (((("_be_0_projects"."id") = ("public"."profiles_associations"."project_id")) AND ($14)) AND (($15) AND ((((("_be_0_projects"."group_id") = (($16)::uuid)) OR ((("_be_0_projects"."group_id") IS NULL) AND ((($17)::uuid) IS NULL))) AND ($18)) AND ($19)))) )) AND ($20)) OR (((EXISTS (SELECT $21 FROM "public"."companies" AS "_be_1_companies" WHERE (((("_be_1_companies"."id") = ("public"."profiles_associations"."company_id")) AND ($22)) AND (($23) AND (((("_be_1_companies"."group_id") = (($24)::uuid)) AND ($25)) AND ($26)))) )) AND ($27)) OR ($28))) AND ($29))::boolean ELSE (((("public"."profiles_associations"."group_id") = (($30)::uuid)) AND ($31)) AND ($32))::boolean END AS "check__constraint"), "_aca__profiles_associations" AS (SELECT "profile_id" , "project_id" , "updated_at" , "deleted_at" , "status_id" , "created_at" , "user_id" , "trigger_count_connexions_with_this_profile" , "trigger_count_invitations_scheduled_to_this_profile" , "trigger_count_messages_scheduled_to_this_profile" , "trigger_count_invitations_sent_to_this_profile" , "trigger_count_applications_from_this_profile" , "trigger_count_meetings_done_with_this_profile" , "trigger_count_meetings_scheduled_with_this_profile" , "trigger_count_messages_received_from_this_profile" , "trigger_count_messages_sent_to_this_profile" , "trigger_first_interaction_date" , "trigger_last_interaction_date" , "trigger_status_auto_id" , "trigger_last_interaction_type" , "trigger_count_resumes" , "company_id" , "trigger_external_id" , "association_type" , "source" , "id" , "trigger_is_applicant" , "group_id" , "is_merged_from_id" , "updated_by_user_id" , "updated_status_at" FROM "_mra__profiles_associations" ) SELECT json_build_object($33, (SELECT COUNT(*) FROM "_aca__profiles_associations" ), $34, (SELECT coalesce(json_agg("root" ), $35 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."project_id" AS "projectId", "_root.base"."company_id" AS "companyId", "_root.base"."profile_id" AS "profileId", "_root.base"."deleted_at" AS "deletedAt", $36 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__profiles_associations" WHERE ($37) ) AS "_root.base" ) AS "_root" ), $38, $39 ) , (SELECT coalesce(bool_and("check__constraint" ), $40 ) FROM "_mra__profiles_associations" )
|
|
6 min
< 0.1%
|
1 ms
|
499,204
nhost_hasura
|
WITH "_mra__tasks" AS (UPDATE "public"."tasks" SET "parameters" = ($1)::jsonb,"group_id" = ($2)::uuid WHERE (((("public"."tasks"."group_id") = (($3)::uuid)) OR ((("public"."tasks"."group_id") IS NULL) AND ((($4)::uuid) IS NULL))) AND ((("public"."tasks"."id") = (($5)::uuid)) AND (NOT (("public"."tasks"."status") = ANY(($6)::text[]))))) RETURNING * , ($7)::boolean AS "check__constraint"), "_aca__tasks" AS (SELECT "id" , "created_at" , "updated_at" , "deleted_at" , "type" , "status" , "parameters" , "return" , "user_id" , "retries" , "group_id" , "done_at" , "priority" , "return_status_code" , "profile_id" , "project_id" , "email_address" , "message_scheduled_id" , "linkedin_seat_id" , "file_id" , "external_id" , "oauth_account_id" , "version" , "since" , "duration" , "user_id_or_group_id" , "historyentry_id" , "phone_number_provider_id" , "retry_at" , "trigger_id" , "trigger_worker_type" , "recording_id" , "resume_when" , "skip_extension_queue_and_execute_immediately" , "cancel_at" , "dashboard_id" FROM "_mra__tasks" ) SELECT json_build_object($8, (SELECT coalesce(json_agg("root" ), $9 ) AS "root" FROM (SELECT row_to_json((SELECT "_e" FROM (SELECT "_root.base"."id" AS "id", "_root.base"."status" AS "status", "_root.base"."type" AS "type", "_root.base"."parameters" AS "parameters", "_root.base"."profile_id" AS "profileId", "_root.base"."user_id" AS "userId", "_root.base"."group_id" AS "groupId", $10 AS "__typename" ) AS "_e" ) ) AS "root" FROM (SELECT * FROM "_aca__tasks" WHERE ($11) ) AS "_root.base" ) AS "_root" ), $12, $13 ) , (SELECT coalesce(bool_and("check__constraint" ), $14 ) FROM "_mra__tasks" )
|
|
5 min
< 0.1%
|
72 ms
|
4,568
nhost_hasura
|
WITH "_mra__campains_profiles" AS (INSERT INTO "public"."campains_profiles" ( "campain_id", "profile_id" ) VALUES ($1, ($2)::uuid) RETURNING * , ((((EXISTS (SELECT $3 FROM "public"."campains" AS "_be_0_campains" WHERE (((("_be_0_campains"."id") = ("public"."campains_profiles"."campain_id")) AND ($4)) AND (($5) AND ((EXISTS (SELECT $6 FROM "auth"."users" AS "_be_1_auth_users" WHERE (((("_be_1_auth_users"."id") = ("_be_0_campains"."user_id")) AND ($7)) AND (($8) AND ((EXISTS (SELECT $9 FROM "public"."users_groups" AS "_be_2_users_groups" WHERE (((("_be_2_users_groups"."user_id") = ("_be_1_auth_users"."id")) AND ($10)) AND (($11) AND (((("_be_2_users_groups"."group_id") = (($12)::uuid)) AND ($13)) AND ($14)))) )) AND ($15)))) )) AND ($16)))) )) AND ($17)) AND (((EXISTS (SELECT $18 FROM "public"."profiles" AS "_be_3_profiles" WHERE (((("_be_3_profiles"."id") = ("public"."campains_profiles"."profile_id")) AND ($19)) AND (($20) AND ((((("_be_3_profiles"."group_id") = (($21)::uuid)) OR ((("_be_3_profiles"."group_id") IS NULL) AND ((($22)::uuid) IS NULL))) AND ($23)) AND ($24)))) )) AND ($25)) AND ($26))) AND ($27))::boolean AS "check__constraint"), "_aca__campains_profiles" AS (SELECT "campain_id" , "profile_id" , "created_at" , "updated_at" , "id" , "deleted_at" FROM "_mra__campains_profiles" ) SELECT json_build_object($28, (SELECT COUNT(*) FROM "_aca__campains_profiles" ) ) , (SELECT coalesce(bool_and("check__constraint" ), $29 ) FROM "_mra__campains_profiles" )
|