Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve find-existing-acitivty query in data-sink-worker #2056

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

sausage-todd
Copy link
Contributor

This change makes it use:

CREATE UNIQUE INDEX activities_tenant_segment_source_id_idx
ON activities ("tenantId", "segmentId", "sourceId")
WHERE ("deletedAt" IS NULL);

instead of:

CREATE UNIQUE INDEX ix_unique_activities_tenantid_platform_type_sourceid_segmentid
ON activities ("tenantId", platform, type, "sourceId", "segmentId");

@sausage-todd sausage-todd force-pushed the data-sink-worker-use-activity-index branch from 0fa446b to 447646b Compare January 10, 2024 08:25
This change makes it use:

    CREATE UNIQUE INDEX activities_tenant_segment_source_id_idx
    ON activities ("tenantId", "segmentId", "sourceId")
    WHERE ("deletedAt" IS NULL);

instead of:

    CREATE UNIQUE INDEX ix_unique_activities_tenantid_platform_type_sourceid_segmentid
    ON activities ("tenantId", platform, type, "sourceId", "segmentId");
@sausage-todd sausage-todd force-pushed the data-sink-worker-use-activity-index branch from 447646b to 5b50777 Compare January 10, 2024 08:40
@sausage-todd sausage-todd merged commit 76c5832 into main Jan 10, 2024
8 checks passed
@sausage-todd sausage-todd deleted the data-sink-worker-use-activity-index branch January 10, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant