<p>I am looking to store 2D arrays of 900x100 elements in a database.  Efficient recall and comparison of the arrays is important.  I could use a table with a schema like [A, x, y, A(x,y)] such that a single array would compromise 90,000 records.  This seems like an ~ok~ table design to store the array, and would provide for efficient recall of single elements, but inefficient recall of a whole array and would make for very inefficient array comparisons.</p>

<p>Should I leave the table design this way and build and compare my arrays in code?  Or is there a better way to structure the table such that I can get efficient array comparisons using database only operations?</p>

<p>thanks</p>

900 x 100 elements is actually very small (even if the elements are massive 1K things that'd only be 90 MB).  Can't you just compare in memory when needed and store on disk in some serialized format?
It doesn't make sense to store 2D arrays in the database, especially if it is immutable data.