Last active
August 31, 2022 20:59
-
-
Save vitroz/120f72c401094765db4422bf6ba397f9 to your computer and use it in GitHub Desktop.
bronto_records_to_delete
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table | # of records | |
app_listings -> #1 (check) | |
new_integrations -> #163 (check) | |
webhooks -> #27 | |
webhook_event_definitions_webhooks -> # 27 | |
trackable_tasks (associated to bronto webhooks) -> # 752 | |
trackable_tasks (associated to bronto new integrations) -> # 64 | |
trackable_tasks type = 'TrackableTask::BrontoSyncBulk' -> #21 | |
trackable_tasks type = 'TrackableTask::BrontoWebhookInitialSync' -> #27 | |
trackable_tasks type = 'TrackableTask::BrontoWebhookSetup' -> # 33 | |
connected_accounts -> # 21 | |
integration_events (app_slug = 'bronto') -> # 257 | |
///// count queries ////// | |
select * from app_listings where app_id = 11 --// 1 (check) | |
select * from new_integrations where app_id = 11 --// # 163 (check) | |
select count(*) from webhooks where app_id = 11 --// # 27 | |
select count(we.*) from webhook_event_definitions_webhooks we | |
join webhooks w on w.id = we.webhook_id | |
where w.app_id = 11 --// # 27 | |
select count(we.*) from trackable_tasks we | |
join webhooks w on w.id = we.owner_webhook_id | |
where w.app_id = 11 --// # 752 | |
select count(t.*) from trackable_tasks t | |
join new_integrations n on n.id = t.owner_integration_id | |
where n.type = 'NewIntegration::BrontoNewIntegration' --// # 64 | |
select count(*) from trackable_tasks where type = 'TrackableTask::BrontoSyncBulk' --// #21 | |
select count(*) from trackable_tasks where type = 'TrackableTask::BrontoWebhookInitialSync' --// #27 | |
select count(*) from trackable_tasks where type = 'TrackableTask::BrontoWebhookSetup' --// # 33 | |
select * from connected_accounts where type = 'ConnectedAccount::BrontoConnectedAccount' --// # 21 | |
select count(*) from integration_events where app_slug = 'bronto' --// # 257 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment