Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Postgresql and big multidimensional arrays

i used to work with mysql and save my huge 3 dimensional arrays as blob files but now i'm using postgresql and it looks like it supports array datatype. does any fast method exist to store those big arrays into the postgre database? i mean each 3d array has to be saved in a single cell from the postgre table and not as a table. Im working with Matlab, where the data is in under the form of 176x144x1750 Int arrays, and i can directly connect to the database from matlab and execute queries. thanks for your help.

like image 847
Mehdi Avatar asked Dec 13 '25 14:12

Mehdi


1 Answers

I would use a three-dimensional array.

For example: CREATE TABLE ( INTEGER id PRIMARY KEY, array INTEGER[][][] );

I think you will find more tips about postgres muldimensional arrays in this link http://www.chsd.com.br/index.php?option=Article&action=Show&view=Article&id=3

There is the PostgreSQL page too. http://www.postgresql.org/docs/9.0/static/arrays.html

like image 103
Vinicius Camargo Avatar answered Dec 16 '25 09:12

Vinicius Camargo