-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindexes.sql
More file actions
17 lines (16 loc) · 875 Bytes
/
Copy pathindexes.sql
File metadata and controls
17 lines (16 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- ==============================================================================
-- SHARED INDEX DEFINITIONS
-- ==============================================================================
-- Project: CSS_MPC_toolkit
--
-- Performance indexes on MPC/SBN tables used by multiple scripts in this
-- project. Safe to run repeatedly (CREATE IF NOT EXISTS).
--
-- These indexes are created on the existing MPC/SBN tables (obs_sbn,
-- mpc_orbits) and do not modify any data.
-- ==============================================================================
-- obs_sbn indexes for discovery matching
CREATE INDEX IF NOT EXISTS idx_obs_sbn_disc ON obs_sbn(disc) WHERE disc = '*';
CREATE INDEX IF NOT EXISTS idx_obs_sbn_provid ON obs_sbn(provid);
CREATE INDEX IF NOT EXISTS idx_obs_sbn_permid ON obs_sbn(permid);
CREATE INDEX IF NOT EXISTS idx_obs_sbn_trksub ON obs_sbn(trksub);