[index] Add index on status_stats.created_at
This commit is contained in:
parent
46ceced444
commit
7a58d0fa58
@ -0,0 +1,7 @@
|
|||||||
|
class AddIndexOnStatusStatsCreatedAt < ActiveRecord::Migration[5.2]
|
||||||
|
disable_ddl_transaction!
|
||||||
|
|
||||||
|
def change
|
||||||
|
add_index :status_stats, :created_at, algorithm: :concurrently
|
||||||
|
end
|
||||||
|
end
|
@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 2021_01_02_225500) do
|
ActiveRecord::Schema.define(version: 2021_01_03_150000) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "pg_stat_statements"
|
enable_extension "pg_stat_statements"
|
||||||
@ -730,6 +730,7 @@ ActiveRecord::Schema.define(version: 2021_01_02_225500) do
|
|||||||
t.bigint "favourites_count", default: 0, null: false
|
t.bigint "favourites_count", default: 0, null: false
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
|
t.index ["created_at"], name: "index_status_stats_on_created_at"
|
||||||
t.index ["favourites_count"], name: "index_status_stats_on_favourites_count"
|
t.index ["favourites_count"], name: "index_status_stats_on_favourites_count"
|
||||||
t.index ["reblogs_count"], name: "index_status_stats_on_reblogs_count"
|
t.index ["reblogs_count"], name: "index_status_stats_on_reblogs_count"
|
||||||
t.index ["replies_count"], name: "index_status_stats_on_replies_count"
|
t.index ["replies_count"], name: "index_status_stats_on_replies_count"
|
||||||
|
Loading…
Reference in New Issue
Block a user