今日は9.5の小ネタを。 9.5のリリースノートを見ると、こんな項目がある。 Improve the speed of sorting character and numeric fields (Peter Geoghegan, Andrew Gierth, Robert Haas) 要するにnumeric型と文字型のソート性能が向上したよと。 今日はそれを試してみた。 測定内容 以下の様なinteger型、numeric型、text型のカラムを持つテーブルを作成しておく。 CREATE TABLE test (id int, data1 numeric, data2 text);で、こんな感じでnumeric型カラムとtext型カラムにランダムなデータを投入しておく。 INSERT INTO test (id, data1, data2) VALUES ( generate_series