Description
This is a suggestion to change the rails guide on Debugging Rails Applications under the SQL Query Comments section.
When enabling SQL query comments with config.active_record.query_log_tags_enabled = true
, it also disables prepared statements as per https://github.com/rails/rails/pull/48631/files#diff-e19d81632142a957f90fe9a8d63f064a64bdb3f2cdc75f3968420ad5cb2f5319R178 and it totally makes sense as to why that is.
The SQL Query Comments guide at https://github.com/rails/rails/blob/885734a8/guides/source/debugging_rails_applications.md?plain=1#L253-L278 briefly tells that it shouldn't be used in production.
I don't know how impactful on performance disabling prepared statements in production would be, but guessing that it'd be significant, I think the rails guide on SQL Query Comments could be more explicit that prepared statements will also be disabled and that the impact in production's performance isn't only related to a possible high log volume but also due to the fact that prep statements are now off.