Corrupt Temporary Statistics in SQL Server 2014 Readable Replica

Earlier this week, the Database Strategy Team at my company was contacted about queries that were failing on one specific table. The same query on TableX and TableZ were successful, but it failed on TableY (not the real table names, but it is data partitioned into separate tables where the names are serialized in that fashion). They also reported that it did not fail when they ran the query directly in SQL Server Management Studio (SSMS). While I was just
read more