-- Indexes for referral list ordered by commission DESC (level 1, 2, 3).
-- Queries filter by referer_id_N and order by to_referer_N DESC.
CREATE INDEX idx_users_d_referer1_commission ON db_users_d (referer_id_1, to_referer_1 DESC);
CREATE INDEX idx_users_d_referer2_commission ON db_users_d (referer_id_2, to_referer_2 DESC);
CREATE INDEX idx_users_d_referer3_commission ON db_users_d (referer_id_3, to_referer_3 DESC);
