【SELECT】の検索結果
hmm
なんかweb側からこんなログが出てたぞ…
query is slow: SELECT "ChartXinstance"."id" AS "ChartXinstance_id", "ChartXinstance"."date" AS "ChartXinstance_date", "ChartXinstance"."group" AS "ChartXinstance_group", "ChartXinstance"."___requests_failed" AS "ChartXinstance____requests_failed", "ChartXinstance"."___requests_succeeded" AS "ChartXinstance____requests_succeeded", "ChartXinstance"."___requests_received" AS "ChartXinstance____requests_received", "ChartXinstance"."___notes_total" AS "ChartXinstance____notes_total", "ChartXinstance"."___notes_inc" AS "ChartXinstance____notes_inc", "ChartXinstance"."___notes_dec" AS "ChartXinstance____notes_dec", "ChartXinstance"."___notes_diffs_normal" AS "ChartXinstance____notes_diffs_normal", "ChartXinstance"."___notes_diffs_reply" AS "ChartXinstance____notes_diffs_reply", "ChartXinstance"."___notes_diffs_renote" AS "ChartXinstance____notes_diffs_renote", "ChartXinstance"."___notes_diffs_withFile" AS "ChartXinstance____notes_diffs_withFile", "ChartXinstance"."___users_total" AS "ChartXinstance____users_total", "ChartXinstance"."___users_inc" AS "ChartXinstance____users_inc", "ChartXinstance"."___users_dec" AS "ChartXinstance____users_dec", "ChartXinstance"."___following_total" AS "ChartXinstance____following_total", "ChartXinstance"."___following_inc" AS "ChartXinstance____following_inc", "ChartXinstance"."___following_dec" AS "ChartXinstance____following_dec", "ChartXinstance"."___followers_total" AS "ChartXinstance____followers_total", "ChartXinstance"."___followers_inc" AS "ChartXinstance____followers_inc", "ChartXinstance"."___followers_dec" AS "ChartXinstance____followers_dec", "ChartXinstance"."___drive_totalFiles" AS "ChartXinstance____drive_totalFiles", "ChartXinstance"."___drive_incFiles" AS "ChartXinstance____drive_incFiles", "ChartXinstance"."___drive_decFiles" AS "ChartXinstance____drive_decFiles", "ChartXinstance"."___drive_incUsage" AS "ChartXinstance____drive_incUsage", "ChartXinstance"."___drive_decUsage" AS "ChartXinstance____drive_decUsage" FROM "__chart__instance" "ChartXinstance" WHERE (("ChartXinstance"."date" = $1) AND ("ChartXinstance"."group" = $2)) LIMIT 1
なんで多分以下を叩くことになって流石に心配なのでテスト環境上でバックアップ取ってる
DELETE FROM "user_publickey"
WHERE "userId" NOT IN (SELECT "id" FROM "user");
これ叩いたら7000件くらい出てきた
SELECT "userId" FROM "user_publickey"
WHERE "userId" NOT IN (SELECT "id" FROM "user");
If your database is not using C or POSIX for its collation setting (which you can check with SELECT datcollate FROM pg_database WHERE datname = current_database();), your indexes might be inconsistent if you ever ran with a version of glibc prior to 2.28 and did not immediately reindex your databases after updating to glibc 2.28 or newer.https://docs.joinmastodon.org/admin/troubleshooting/index-corruption/
libcのバージョンでDBのインデックス不整合が起きるのか…