LoginSignup
8
5

More than 5 years have passed since last update.

RedShiftでテーブルに未ソート行があるか確認する

Posted at
やりかた
SELECT slice,id,db_id,name,rows,sorted_rows,(rows-sorted_rows) as row_diff FROM stv_tbl_perm ORDER BY db_id, name, slice;
  • row_diffが1以上なら未ソート行がある
  • VACCUM SORT ONLY tablename; でソートを指示できる
  • VACUUMしてもソートされない: sortkey設定してるか?
8
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
5