Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimescaleDB対応 #12960

Open
1 task
syuilo opened this issue Jan 10, 2024 · 1 comment
Open
1 task

TimescaleDB対応 #12960

syuilo opened this issue Jan 10, 2024 · 1 comment
Labels
✨Feature This adds/improves/enhances a feature packages/backend Server side specific issue/PR

Comments

@syuilo
Copy link
Member

syuilo commented Jan 10, 2024

Summary

TimescaleDBに対応する
https://www.timescale.com/

Purpose

スケーラビリティ向上

Do you want to implement this feature yourself?

  • Yes, I will implement this by myself and send a pull request
@syuilo syuilo added ✨Feature This adds/improves/enhances a feature packages/backend Server side specific issue/PR labels Jan 10, 2024
@u1-liquid
Copy link
Sponsor Contributor

以前リサーチしたことがあるのでコメント残しておきます

  • 基本的には「プライマリーキーにタイムスタンプが含まれていること」以外はアプリケーション側でなにか特殊な処理を必要とするものではない
    ただし、misskeyはクエリーにdatetime型が一切使われていないため、全般的にクエリーを書き直す必要がありそうでした
  • 詳細な設定はDBAがすることにして、TimescaleDBに対応させるテーブルのプライマリーキーを(id, createdAt)の形にするだけで使えそう。

本家ではcreatedAtを消してしまっているため結構重たいマイグレーションが出来上がると思うのでいっそのことついでにnodeとuserのテーブルをローカルとリモートに完全に分離するとDBA的に嬉しいかもしれません。
(分離しておくことでDBに詳しくない管理者でもローカルのノートは全部持ってる、リモートのノートは定期的に https://www.postgresql.org/docs/current/sql-truncate.html で消してしまうなどのコスト削減を試みることができるようになるかも)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨Feature This adds/improves/enhances a feature packages/backend Server side specific issue/PR
Projects
Status: Triage
Development

No branches or pull requests

2 participants