Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F12553255
20220506175506_add_index_hotspots.exs
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
637 B
Referenced Files
None
Subscribers
None
20220506175506_add_index_hotspots.exs
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.Repo.Migrations.AddIndexHotspots
do
use
Ecto.Migration
def
change
do
# Stop inserts into activities from doing a full-table scan of users:
create_if_not_exists
(
index
(
:users
,
[
:ap_id
,
"COALESCE(follower_address, '')"
]))
# Change two indexes and a filter recheck into one index scan:
create_if_not_exists
(
index
(
:following_relationships
,
[
:follower_id
,
:state
]))
create_if_not_exists
(
index
(
:notifications
,
[
:user_id
,
:seen
]))
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Sat, Nov 15, 1:34 AM (13 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
633038
Default Alt Text
20220506175506_add_index_hotspots.exs (637 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment