user2990413
user2990413

Reputation: 21

How to store a huge matrix into database

I plan to use PostgreSQL to store a huge matrix.

The structure of the dataset is like below:

  1. It's a 20,000 * 20,000 matrix
  2. Each element in the matrix has 5ish records to describe the features of the interactions between two nodes.

Is there any way to construct the database to make it easy to store and efficient to query?

Thanks in advance!

Upvotes: 2

Views: 681

Answers (1)

Juan Pablo Paz Grau
Juan Pablo Paz Grau

Reputation: 156

My first advice would be to design you table with the column and row of each matrix element.

Eg. table = {row,column,record1,record2,record3,record4,record5}, with {row,column} been the primary key.

Hope it helps.

Upvotes: 5

Related Questions