Skip to content

Should Active Record disable prepared statements if QueryLogs are enabled? #48398

@casperisfine

Description

@casperisfine

Ref: #42240

ActiveRecord::QueryLogs was a direct port of Marginalia, and it just hit me that Marginalia was very purposely disabling prepared statements: https://github.com/basecamp/marginalia/blob/c02d3d8404b15004c3432783543b8fc04306927b/lib/marginalia.rb#L67

I think AR::QueryLogs should do the same to avoid generating tons of prepared statements, as with query logs each query has a high chance to be unique, making prepared statements a useless overhead.

cc @keeran @eileencodes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions