Aias00 opened a new issue, #6677: URL: https://github.com/apache/shenyu/issues/6677
- severity: High; files: `shenyu-admin/src/main/resources/sql-script/h2/schema.sql` and `db/init/mysql/schema.sql` - description: Beyond PKs, the schema defines almost no secondary indexes. The only ones are `proxy_api_key_mapping.idx_namespace_enabled`, `discovery_upstream.discovery_upstream_discovery_handler_id_IDX`, `plugin_handle.plugin_id_field_type`, `shenyu_dict.dict_type_dict_code_dict_name`, `dashboard_user.user_name`, plus a few unique keys. Every other join/where column is unindexed, specifically: `selector(namespace_id, plugin_id, selector_name)`, `rule(namespace_id, selector_id, rule_name)`, `meta_data(path, namespace_id, app_name, service_name)`, `app_auth(app_key, namespace_id)`, `auth_path(auth_id)`, `auth_param(auth_id)`, `permission(object_id, resource_id)`, `data_permission(user_id, data_id, data_type)`, `tag_relation(api_id, tag_id)`, `api(api_path, http_method, rpc_type, context_path, state, date_created)`, `api_rule_relation(api_id, rule_id)`, `namespace_plugin_rel(namespace_id, plugin_id, enabled)`, `discovery_rel(proxy_selector_id, selector_id, discovery_handler_id)`, ` discovery_handler(discovery_id)`, `discovery(namespace_id, plugin_name)`, `proxy_selector(namespace_id)`, `operation_record_log(operation_time, operator)`, `instance_info(namespace_id, instance_ip)`, `mock_request_record(api_id)`, `namespace_user_rel(namespace_id, user_id)`, `user_role(user_id, role_id)`, `resource(parent_id)`. - impact: All WHERE/JOIN/ORDER BY predicates above fall back to full table scans; compounds PERF-A1..A8. - suggested_fix: Add the listed composite secondary indexes (DDL in both H2 and MySQL schema files). - confidence: High --- _Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/00-consolidated-critical-high.md`](docs/scan2-2026-08-02/00-consolidated-critical-high.md)._ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
