LoginSignup
0
2

More than 1 year has passed since last update.

Herokuで使っているHeroku PostgresにIndexをはるには

Posted at

基本的なことですがやったことなかったので備忘録

Heroku Postgresにログインする

コンソールから
$ heroku pg:psql -a アプリ名
で利用しているPostgresに入れます

Indexの貼り方

上記コマンドでログインできているので、あとは一般的なPostgreSQLの作法に従って下さい。

CREATE INDEX index_name ON table_name (column_name);
とか、Tableにロックをかけずにインデックスを作成する場合には
CREATE INDEX CONCURRENTLY index_name ON table_name (column_name);

とやります。

0
2
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
0
2