I was looking at some of the *-Types tables in the Stack Exchange Data Explorer. specially
As I'm lazy I clicked the (i) that is found in the right hand side of the SEDE query editor and to my surprise it listed values up to id = 13 where a
select * from CloseAsOffTopicReasonTypes returned values with id = 16.
On closer inspection I believe the current values shown in the meta data are from Software Engineering.SE. I think that is because in the [Data.StackExchange] database
select top 1 * from Sites1 returns programmers as the first row. It populates the TablesCache with the values found in that database.
It looks like the Application setting for
PerSite is false as I also maintain that same value here: Add quick content viewer to 'ReviewTaskStates' and 'ReviewRejectionReasons'
While it was reasonable to have that value set to false when all Types tables were the same across all databases, with the addition of a Types table that does have per site content, the
PerSite setting has to be reconsidered.
I propose the
PerSite setting is switched to
true. This can be done in the appsettings.config or in the AppSettings table but requires a restart as the value is never rechecked at runtime. Setting the value to
true will incur a higher memory load as now the values of the %Types tables of each of the 350 databases has to be kept in memory.
It is a minor issue as only two tables are affected at the moment, CloseAsOffTopicReasonTypes and PostNoticeTypes. None of the other *Types tables seem to have per site specific content. If the setting is left as is, consider this report to be the sign-post for future confused users.
select top isn't stable due to a lacking order by clause, that is maybe another issue that needs fixing