Provide dedicated system privilege for run SET STATISTICS INDEX <table> (for non-DBA)
Currently index statistics can be re-calculated only when user has system privilege for ALTERING ANY table. It seems useful to split such actions: ALTER ANY table is much powerful (and dangerous) than SET STAT INDEX which definitely can not broke nothing (except change plan for some of SQL statements - but this outcome occurs regardless who does this: SYSDBA or no).
Could you split off the request for an abbreviation for set statistics to a separate issue? Thanks.
Mark, https://github.com/FirebirdSQL/firebird/issues/6951
AFAIU, you're not correct regarding ALTER ANY TABLE, it's enough to have ALTER permission for the particular table to recalculate its indices. However, I doubt such a flexibility makes sense in practice. I'd rather vote for a global privilege that affects all statistics inside the database.
it's enough to have ALTER permission for the particular table to recalculate its indices For what particular table ? We have "GRANT ALTER ANY <OBJECT> TO [USER | ROLE] <user/role name> [WITH GRANT OPTION];" - i.e. this privilege relate to all existing user tables. Not for some of them. Similarly, privilege to recalculate indices statistics also can be common, for all tables.