Unexpected SQL queries to Postgres database on Rails/Heroku

前端 未结 4 911
灰色年华
灰色年华 2021-02-07 10:47

I was diving into a really long request to one of my Rails applications using NewRelic and found a number of SQL queries that appear entirely foreign that are taking up a signif

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-07 11:30

    These queries are used to get the "definition" of your tables and fields and are probably used by the framework to you're using to automatically generate models and/or validation rules in Ruby. (E.g. "Introspection")

    I do not have experience with Ruby and the framework you're using, but I don't expect these queries to originate from SQL injection.

    You can run the queries yourself in pgAdmin or psql to show the results they're producing and get an idea what information they get from the database

提交回复
热议问题