gitlab-org--gitlab-foss/db/post_migrate
Stan Hu 5bb2f0c6fc Add partial index on identities table to speed up LDAP lookups
For customers with thousands of entries in the table, lookups for an
LDAP identity dominated the PostgreSQL statistics because of sequential
scans. We can speed this up by adding a partial index with the
extern_uid and provider.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59630
2019-07-30 08:45:37 -07:00
..
.gitkeep
20180104131052_schedule_set_confidential_note_events_on_webhooks.rb
20180119121225_remove_redundant_pipeline_stages.rb
20180122154930_schedule_set_confidential_note_events_on_services.rb
20180204200836_change_author_id_to_not_null_in_todos.rb
20180212101828_add_tmp_partial_null_index_to_builds.rb
20180212101928_schedule_build_stage_migration.rb
20180212102028_remove_tmp_partial_null_index_from_builds.rb
20180216121020_fill_pages_domain_verification_code.rb
20180216121030_enqueue_verify_pages_domain_workers.rb
20180220150310_remove_empty_extern_uid_auth0_identities.rb
20180223124427_build_user_interacted_projects_table.rb Add a rubocop for Rails.logger 2019-07-10 19:26:47 +00:00
20180301084653_change_project_namespace_id_not_null.rb
20180305100050_remove_permanent_from_redirect_routes.rb
20180306074045_migrate_create_trace_artifact_sidekiq_queue.rb
20180306164012_add_path_index_to_redirect_routes.rb
20180307012445_migrate_update_head_pipeline_for_merge_request_sidekiq_queue.rb
20180405101928_reschedule_builds_stages_migration.rb
20180408143355_cleanup_users_rss_token_rename.rb
20180409170809_populate_missing_project_ci_cd_settings.rb Remove dead MySQL code 2019-07-23 16:53:03 +01:00
20180420080616_schedule_stages_index_migration.rb
20180424151928_fill_file_store.rb
20180430143705_backfill_runner_type_for_ci_runners_post_migrate.rb
20180507083701_set_minimal_project_build_timeout.rb
20180511174224_add_unique_constraint_to_project_features_project_id.rb
20180512061621_add_not_null_constraint_to_project_features_project_id.rb
20180514161336_remove_gemnasium_service.rb
20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb
20180529152628_schedule_to_archive_legacy_traces.rb
20180603190921_migrate_object_storage_upload_sidekiq_queue.rb
20180604123514_cleanup_stages_position_migration.rb
20180608201435_cleanup_merge_requests_allow_collaboration_rename.rb
20180629191052_add_partial_index_to_projects_for_last_repository_check_at.rb
20180702120647_enqueue_fix_cross_project_label_links.rb
20180704145007_update_project_indexes.rb
20180706223200_populate_site_statistics.rb
20180809195358_migrate_null_wiki_access_levels.rb
20180816161409_migrate_legacy_artifacts_to_job_artifacts.rb
20180816193530_rename_login_root_namespaces.rb
20180826111825_recalculate_site_statistics.rb
20180913142237_schedule_digest_personal_access_tokens.rb
20180914162043_encrypt_web_hooks_columns.rb
20180914201132_remove_sidekiq_throttling_from_application_settings.rb
20180917172041_remove_wikis_count_from_site_statistics.rb
20181008145341_steal_encrypt_columns.rb
20181008145359_remove_web_hooks_token_and_url.rb
20181008200441_remove_circuit_breaker.rb
20181010133639_backfill_store_project_full_path_in_repo.rb
20181013005024_remove_koding_from_application_settings.rb
20181022173835_enqueue_populate_cluster_kubernetes_namespace.rb
20181026091631_migrate_forbidden_redirect_uris.rb
20181030135124_fill_empty_finished_at_in_deployments.rb
20181101091005_steal_digest_column.rb
20181101091124_remove_token_from_personal_access_tokens.rb
20181105201455_steal_fill_store_upload.rb
20181107054254_remove_restricted_todos_again.rb
20181121111200_schedule_runners_token_encryption.rb
20181123042307_drop_site_statistics.rb
20181130102132_backfill_hashed_project_repositories.rb
20181219130552_update_project_import_visibility_level.rb Remove dead MySQL code 2019-07-23 16:53:03 +01:00
20181219145520_migrate_cluster_configure_worker_sidekiq_queue.rb
20190102152410_delete_inconsistent_internal_id_records2.rb
20190115054215_migrate_delete_container_repository_worker.rb
20190124200344_migrate_storage_migrator_sidekiq_queue.rb
20190131122559_fix_null_type_labels.rb
20190204115450_migrate_auto_dev_ops_domain_to_cluster_domain.rb Remove dead MySQL code 2019-07-23 16:53:03 +01:00
20190214112022_schedule_sync_issuables_state_id.rb
20190301081611_migrate_project_migrate_sidekiq_queue.rb
20190313092516_clean_up_noteable_id_for_notes_on_commits.rb
20190322132835_schedule_populate_merge_request_assignees_table.rb
20190325111602_rename_v2_root_namespaces.rb
20190402224749_schedule_merge_request_assignees_migration_progress_check.rb Backport the EE schema and migrations to CE 2019-06-17 17:09:05 +02:00
20190404143330_add_unique_constraint_to_approvals_user_id_and_merge_request_id.rb Remove dead MySQL code 2019-07-23 16:53:03 +01:00
20190404231137_remove_alternate_url_from_geo_nodes.rb Backport the EE schema and migrations to CE 2019-06-17 17:09:05 +02:00
20190418132125_populate_project_statistics_packages_size.rb Backport the EE schema and migrations to CE 2019-06-17 17:09:05 +02:00
20190424134256_drop_projects_ci_id.rb
20190506135400_schedule_sync_issuables_state_id_where_nil.rb
20190511144331_remove_users_support_type.rb Backport the EE schema and migrations to CE 2019-06-17 17:09:05 +02:00
20190517153211_migrate_k8s_service_integration.rb
20190520201748_populate_rule_type_on_approval_merge_request_rules.rb Backport the EE schema and migrations to CE 2019-06-17 17:09:05 +02:00
20190522143720_drop_project_auto_devops_domain.rb
20190524073827_schedule_fill_valid_time_for_pages_domain_certificates.rb
20190527194900_schedule_calculate_wiki_sizes.rb
20190528180441_enqueue_reset_merge_status.rb
20190606163724_migrate_legacy_managed_clusters_to_unmanaged.rb
20190606175050_encrypt_feature_flags_clients_tokens.rb Add migrations needed to encrypt feature flags client tokens 2019-06-18 11:09:15 +12:00
20190611161642_add_index_to_events_and_audit_events_created_at_author_id.rb Add index to events and audit_events tables 2019-06-18 09:26:07 +10:00
20190613231640_migrate_managed_clusters_with_no_token_to_unmanaged.rb Migrate clusters with no token to unmanaged 2019-06-21 08:30:26 +10:00
20190618171120_update_geo_nodes_primary.rb Disallow NULL values for geo_nodes.primary column 2019-06-18 17:14:33 -05:00
20190619175843_remove_import_columns_from_projects.rb Remove import columns from projects table 2019-06-19 13:30:41 -07:00
20190620112608_enqueue_reset_merge_status_second_run.rb Automatically update MR merge-ref along merge status 2019-06-20 11:48:30 -03:00
20190625184066_remove_sentry_from_application_settings.rb refactor(db): remove Sentry from application settings, disable_ddl_transaction 2019-06-25 22:06:17 +02:00
20190628191740_schedule_fixing_names_of_user_namespaces.rb Fix incorrect namespaces & route for user-routes 2019-07-09 18:09:45 +02:00
20190702173936_populate_remaining_merge_request_assignees.rb Add cleanup migration for MR's mutliple assignees 2019-07-09 12:13:55 +03:00
20190703185326_fix_wrong_pages_access_level.rb Fix wrong pages access level default 2019-07-17 12:56:58 +00:00
20190715043944_remove_sha_index_from_versions.rb Migrations for adding issue_id to versions table 2019-07-29 18:55:19 +00:00
20190715044501_add_unique_issue_id_sha_index_to_versions.rb Migrations for adding issue_id to versions table 2019-07-29 18:55:19 +00:00
20190715114644_drop_project_features_pages_access_level_default.rb Fix wrong pages access level default 2019-07-17 12:56:58 +00:00
20190723105753_add_index_on_identities_lower_extern_uid_and_provider.rb Add partial index on identities table to speed up LDAP lookups 2019-07-30 08:45:37 -07:00