-- 数据库索引优化
-- 生成时间: 2026-04-09 14:09:58

CREATE INDEX idx_created_at ON `wa_address` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_address` (`updated_at`);
CREATE INDEX idx_created_at ON `wa_address` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_address` (`updated_at`);
CREATE INDEX idx_user_id_created_at ON `wa_address` (`user_id`, `created_at`);
CREATE INDEX idx_status_created_at ON `wa_address` (`status`, `created_at`);
CREATE INDEX idx_status ON `wa_admin` (`status`);
CREATE INDEX idx_created_at ON `wa_admin` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_admin` (`updated_at`);
CREATE INDEX idx_email ON `wa_admin` (`email`);
CREATE INDEX idx_created_at ON `wa_admin` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_admin` (`updated_at`);
CREATE INDEX idx_status ON `wa_admin` (`status`);
CREATE INDEX idx_email ON `wa_admin` (`email`);
CREATE INDEX idx_status_created_at ON `wa_admin` (`status`, `created_at`);
CREATE INDEX idx_role_id ON `wa_admin_access` (`role_id`);
CREATE INDEX idx_admin_id ON `wa_admin_access` (`admin_id`);
CREATE INDEX idx_admin_id ON `wa_admin_access` (`admin_id`);
CREATE INDEX idx_created_at ON `wa_admin_role` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_admin_role` (`updated_at`);
CREATE INDEX idx_created_at ON `wa_admin_role` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_admin_role` (`updated_at`);
CREATE INDEX idx_status ON `wa_admin_rule` (`status`);
CREATE INDEX idx_type ON `wa_admin_rule` (`type`);
CREATE INDEX idx_created_at ON `wa_admin_rule` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_admin_rule` (`updated_at`);
CREATE INDEX idx_created_at ON `wa_admin_rule` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_admin_rule` (`updated_at`);
CREATE INDEX idx_status ON `wa_admin_rule` (`status`);
CREATE INDEX idx_type ON `wa_admin_rule` (`type`);
CREATE INDEX idx_status_created_at ON `wa_admin_rule` (`status`, `created_at`);
CREATE INDEX idx_type_created_at ON `wa_admin_rule` (`type`, `created_at`);
CREATE INDEX idx_status ON `wa_album` (`status`);
CREATE INDEX idx_created_at ON `wa_album` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_album` (`updated_at`);
CREATE INDEX idx_created_at ON `wa_album` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_album` (`updated_at`);
CREATE INDEX idx_status ON `wa_album` (`status`);
CREATE INDEX idx_status_created_at ON `wa_album` (`status`, `created_at`);
CREATE INDEX idx_user_id ON `wa_archives` (`user_id`);
CREATE INDEX idx_category_id ON `wa_archives` (`category_id`);
CREATE INDEX idx_user_id ON `wa_archives` (`user_id`);
CREATE INDEX idx_status ON `wa_archives` (`status`);
CREATE INDEX idx_type ON `wa_archives` (`type`);
CREATE INDEX idx_created_at ON `wa_archives` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_archives` (`updated_at`);
CREATE INDEX idx_created_at ON `wa_archives` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_archives` (`updated_at`);
CREATE INDEX idx_status ON `wa_archives` (`status`);
CREATE INDEX idx_type ON `wa_archives` (`type`);
CREATE INDEX idx_user_id_created_at ON `wa_archives` (`user_id`, `created_at`);
CREATE INDEX idx_status_created_at ON `wa_archives` (`status`, `created_at`);
CREATE INDEX idx_type_created_at ON `wa_archives` (`type`, `created_at`);
CREATE INDEX idx_status ON `wa_card` (`status`);
CREATE INDEX idx_type ON `wa_card` (`type`);
CREATE INDEX idx_created_at ON `wa_card` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_card` (`updated_at`);
CREATE INDEX idx_created_at ON `wa_card` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_card` (`updated_at`);
CREATE INDEX idx_status ON `wa_card` (`status`);
CREATE INDEX idx_type ON `wa_card` (`type`);
CREATE INDEX idx_status_created_at ON `wa_card` (`status`, `created_at`);
CREATE INDEX idx_type_created_at ON `wa_card` (`type`, `created_at`);
CREATE INDEX idx_status ON `wa_category` (`status`);
CREATE INDEX idx_type ON `wa_category` (`type`);
CREATE INDEX idx_created_at ON `wa_category` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_category` (`updated_at`);
CREATE INDEX idx_created_at ON `wa_category` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_category` (`updated_at`);
CREATE INDEX idx_status ON `wa_category` (`status`);
CREATE INDEX idx_type ON `wa_category` (`type`);
CREATE INDEX idx_status_created_at ON `wa_category` (`status`, `created_at`);
CREATE INDEX idx_type_created_at ON `wa_category` (`type`, `created_at`);
CREATE INDEX idx_category_id ON `wa_cdkey` (`category_id`);
CREATE INDEX idx_record_id ON `wa_cdkey` (`record_id`);
CREATE INDEX idx_status ON `wa_cdkey` (`status`);
CREATE INDEX idx_type ON `wa_cdkey` (`type`);
CREATE INDEX idx_created_at ON `wa_cdkey` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_cdkey` (`updated_at`);
CREATE INDEX idx_created_at ON `wa_cdkey` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_cdkey` (`updated_at`);
CREATE INDEX idx_status ON `wa_cdkey` (`status`);
CREATE INDEX idx_type ON `wa_cdkey` (`type`);
CREATE INDEX idx_status_created_at ON `wa_cdkey` (`status`, `created_at`);
CREATE INDEX idx_type_created_at ON `wa_cdkey` (`type`, `created_at`);
CREATE INDEX idx_status ON `wa_collection` (`status`);
CREATE INDEX idx_created_at ON `wa_collection` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_collection` (`updated_at`);
CREATE INDEX idx_created_at ON `wa_collection` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_collection` (`updated_at`);
CREATE INDEX idx_status ON `wa_collection` (`status`);
CREATE INDEX idx_user_id_created_at ON `wa_collection` (`user_id`, `created_at`);
CREATE INDEX idx_status_created_at ON `wa_collection` (`status`, `created_at`);
CREATE INDEX idx_type ON `wa_config` (`type`);
CREATE INDEX idx_type ON `wa_config` (`type`);
CREATE INDEX idx_user_id ON `wa_files` (`user_id`);
CREATE INDEX idx_admin_id ON `wa_files` (`admin_id`);
CREATE INDEX idx_user_id ON `wa_files` (`user_id`);
CREATE INDEX idx_admin_id ON `wa_files` (`admin_id`);
CREATE INDEX idx_created_at ON `wa_files` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_files` (`updated_at`);
CREATE INDEX idx_created_at ON `wa_files` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_files` (`updated_at`);
CREATE INDEX idx_user_id_created_at ON `wa_files` (`user_id`, `created_at`);
CREATE INDEX idx_admin_id_created_at ON `wa_files` (`admin_id`, `created_at`);
CREATE INDEX idx_updated_at ON `wa_friend_circle` (`updated_at`);
CREATE INDEX idx_updated_at ON `wa_friend_circle` (`updated_at`);
CREATE INDEX idx_user_id_created_at ON `wa_friend_circle` (`user_id`, `created_at`);
CREATE INDEX idx_status_created_at ON `wa_friend_circle` (`status`, `created_at`);
CREATE INDEX idx_updated_at ON `wa_friend_circle_comment` (`updated_at`);
CREATE INDEX idx_updated_at ON `wa_friend_circle_comment` (`updated_at`);
CREATE INDEX idx_user_id_created_at ON `wa_friend_circle_comment` (`user_id`, `created_at`);
CREATE INDEX idx_status_created_at ON `wa_friend_circle_comment` (`status`, `created_at`);
CREATE INDEX idx_created_at ON `wa_friend_circle_like` (`created_at`);
CREATE INDEX idx_created_at ON `wa_friend_circle_like` (`created_at`);
CREATE INDEX idx_user_id_created_at ON `wa_friend_circle_like` (`user_id`, `created_at`);
CREATE INDEX idx_user_id ON `wa_friend_circle_setting` (`user_id`);
CREATE INDEX idx_user_id ON `wa_friend_circle_setting` (`user_id`);
CREATE INDEX idx_created_at ON `wa_friend_circle_setting` (`created_at`);
CREATE INDEX idx_created_at ON `wa_friend_circle_setting` (`created_at`);
CREATE INDEX idx_user_id_created_at ON `wa_friend_circle_setting` (`user_id`, `created_at`);
CREATE INDEX idx_status ON `wa_gallery` (`status`);
CREATE INDEX idx_created_at ON `wa_gallery` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_gallery` (`updated_at`);
CREATE INDEX idx_created_at ON `wa_gallery` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_gallery` (`updated_at`);
CREATE INDEX idx_status ON `wa_gallery` (`status`);
CREATE INDEX idx_user_id_created_at ON `wa_gallery` (`user_id`, `created_at`);
CREATE INDEX idx_status_created_at ON `wa_gallery` (`status`, `created_at`);
CREATE INDEX idx_created_at ON `wa_payment_order` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_payment_order` (`updated_at`);
CREATE INDEX idx_trade_no ON `wa_payment_order` (`trade_no`);
CREATE INDEX idx_created_at ON `wa_payment_order` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_payment_order` (`updated_at`);
CREATE INDEX idx_trade_no ON `wa_payment_order` (`trade_no`);
CREATE INDEX idx_status_created_at ON `wa_payment_order` (`status`, `created_at`);
CREATE INDEX idx_type_created_at ON `wa_payment_order` (`type`, `created_at`);
CREATE INDEX idx_status ON `wa_payment_refund` (`status`);
CREATE INDEX idx_created_at ON `wa_payment_refund` (`created_at`);
CREATE INDEX idx_created_at ON `wa_payment_refund` (`created_at`);
CREATE INDEX idx_status ON `wa_payment_refund` (`status`);
CREATE INDEX idx_status_created_at ON `wa_payment_refund` (`status`, `created_at`);
CREATE INDEX idx_user_id ON `wa_recharge` (`user_id`);
CREATE INDEX idx_user_id ON `wa_recharge` (`user_id`);
CREATE INDEX idx_created_at ON `wa_recharge` (`created_at`);
CREATE INDEX idx_created_at ON `wa_recharge` (`created_at`);
CREATE INDEX idx_user_id_created_at ON `wa_recharge` (`user_id`, `created_at`);
CREATE INDEX idx_parent_user_id ON `wa_team` (`parent_user_id`);
CREATE INDEX idx_role_id ON `wa_thali` (`role_id`);
CREATE INDEX idx_status ON `wa_thali` (`status`);
CREATE INDEX idx_created_at ON `wa_thali` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_thali` (`updated_at`);
CREATE INDEX idx_created_at ON `wa_thali` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_thali` (`updated_at`);
CREATE INDEX idx_status ON `wa_thali` (`status`);
CREATE INDEX idx_status_created_at ON `wa_thali` (`status`, `created_at`);
CREATE INDEX idx_role_id ON `wa_user` (`role_id`);
CREATE INDEX idx_parent_id ON `wa_user` (`parent_id`);
CREATE INDEX idx_group_id ON `wa_user` (`group_id`);
CREATE INDEX idx_status ON `wa_user` (`status`);
CREATE INDEX idx_created_at ON `wa_user` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_user` (`updated_at`);
CREATE INDEX idx_created_at ON `wa_user` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_user` (`updated_at`);
CREATE INDEX idx_status ON `wa_user` (`status`);
CREATE INDEX idx_status_created_at ON `wa_user` (`status`, `created_at`);
CREATE INDEX idx_user_id ON `wa_user_extend` (`user_id`);
CREATE INDEX idx_user_id ON `wa_user_extend` (`user_id`);
CREATE INDEX idx_status ON `wa_user_role` (`status`);
CREATE INDEX idx_created_at ON `wa_user_role` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_user_role` (`updated_at`);
CREATE INDEX idx_created_at ON `wa_user_role` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_user_role` (`updated_at`);
CREATE INDEX idx_status ON `wa_user_role` (`status`);
CREATE INDEX idx_status_created_at ON `wa_user_role` (`status`, `created_at`);
CREATE INDEX idx_status ON `wa_user_rule` (`status`);
CREATE INDEX idx_type ON `wa_user_rule` (`type`);
CREATE INDEX idx_created_at ON `wa_user_rule` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_user_rule` (`updated_at`);
CREATE INDEX idx_created_at ON `wa_user_rule` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_user_rule` (`updated_at`);
CREATE INDEX idx_status ON `wa_user_rule` (`status`);
CREATE INDEX idx_type ON `wa_user_rule` (`type`);
CREATE INDEX idx_status_created_at ON `wa_user_rule` (`status`, `created_at`);
CREATE INDEX idx_type_created_at ON `wa_user_rule` (`type`, `created_at`);
CREATE INDEX idx_descendant_id ON `wa_user_team` (`descendant_id`);
CREATE INDEX idx_ancestor_id ON `wa_user_team` (`ancestor_id`);
CREATE INDEX idx_status ON `wa_user_team` (`status`);
CREATE INDEX idx_status ON `wa_user_team` (`status`);
CREATE INDEX idx_status ON `wa_version` (`status`);
CREATE INDEX idx_type ON `wa_version` (`type`);
CREATE INDEX idx_status ON `wa_version` (`status`);
CREATE INDEX idx_type ON `wa_version` (`type`);
CREATE INDEX idx_status ON `wa_withdrawl` (`status`);
CREATE INDEX idx_created_at ON `wa_withdrawl` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_withdrawl` (`updated_at`);
CREATE INDEX idx_created_at ON `wa_withdrawl` (`created_at`);
CREATE INDEX idx_updated_at ON `wa_withdrawl` (`updated_at`);
CREATE INDEX idx_status ON `wa_withdrawl` (`status`);
CREATE INDEX idx_user_id_created_at ON `wa_withdrawl` (`user_id`, `created_at`);
CREATE INDEX idx_status_created_at ON `wa_withdrawl` (`status`, `created_at`);
