2
我最近搬到我的Rails應用程序給Postgres並且在發展日誌發現它的完整的SQL語句如下所示:Rails 3與Postgresql - 嘈雜的數據庫?
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
任何人都知道這筆交易是什麼這個問題,好像它是一個性能命中?是嗎?
感謝
可能的重複http://stackoverflow.com/questions/2797107/ruby-on-rails-active-record-generated-sql-on-postgres – 2010-11-04 05:45:57