Rails 3 与 Postgresql - 嘈杂的数据库?
我最近将 Rails 应用程序移至 Postgres,并注意到开发日志中充满了如下所示的 SQL 语句:
SQL (1.1ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"permissions"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
SQL (1.1ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"spaces"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
任何人都知道这是怎么回事,似乎这对性能造成了影响?是吗?
谢谢
I recently moved my Rails app to Postgres and noticed in the developments logs it's full of SQL statements like the following:
SQL (1.1ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"permissions"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
SQL (1.1ms) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"spaces"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
Anyone know what the deal is with this, seems like it's a performance hit? Is it?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 静默-postgres 宝石。
You can get rid of these messages with the silent-postgres gem.