SaaS サービスの 1 つについて、ゼロから再設計しているため、どの DB を使用するかを調査しています。
現在のソリューションでは MySQL を使用し、新規顧客ごとに個別の DB を作成します。現在の (グローバル) 構造は次のとおりです。
- globaldb.globaltable
=> some global data shared with all customers
=> big
=> it would be an option to flatten this data in the customerdb.tablewithreportlines, but this increases the size quite a bit
- customerdb.tablewithstaticdata
=> joins with `globaltable`
=> searched on several columns
=> no group by
=> writes throughout the day, in the thousands
=> reads on request by the customer via the application, so not continuesly
=> can be big per customer, serveral GBs
- customerdb.tablewithreports
=> searched on several columns
=> writes throughout the day, but only in the tens
=> reads on request by the customer via the application, so not continuesly
=> quite small
- customerdb.tablewithreportlines
=> joins with `tablewithreports`
=> joins with `globaltable`
=> most columns are 'searchable'
=> most columns are 'groupable'
=> writes throughout the day, in the thousands but only when processing the `tablewithreports` lines
=> reads on request by the customer via the application, so not continuesly
=> can be big per customer, serveral GBs
customerdb
データが UPDATE されることはなく、 INSERTされるだけです(場合によってはDELETE されます)。
私たちは急速な成長に備えており、これに備えた構造が必要です。新しいインスタンス (必要な場合) を手動で追加することは許容されます。
以前、テスト プロジェクト用に非常に大量のテーブル (およびデータベース) を使用して MySQL をセットアップしました。サーバーが MySQL テーブルの最大ファイル ハンドラーを超えたため、そのプロジェクトは失敗しました。これは約 +-500.000 テーブルでした。この新しいプロジェクトは、間違いなく 500.000 人の顧客を処理できる必要があるため、(この現在の構造では) 150 万のテーブルを処理できる必要があります。
顧客データベースあたりの平均サイズは +- 7.5Mb です。多くはありませんが、サーバーの顧客が DB に複数の GB を持っているため、かなり広がっています。
SO と Google を検索して一致する状況を見つけましたが、見つけることができませんでした。
現時点では、完全な再設計を行っているため、リレーショナル、NoSQL、またはその組み合わせのいずれについても、あらゆる提案を受け付けています。
このユースケースに最適なデータベースはどれですか?
PS: これは私の最初の投稿なので、私が不完全であることを許してください