Data Distribution

Database
Enthusiast

Data Distribution

Hi,

Suppose we have a 10 AMP system. I have a table with 5 rows. How will the rows be distributed on the 10 AMP system.

Thanks
Angel
1 REPLY
Enthusiast

Re: Data Distribution

It all depends on how you define the primary index. You can place the rows all on one AMP, or you can distribute them randomly.

If the table will never have more than a few rows, it would make sense to force them to be all on one AMP. In that case you would define the table with a non-unique primary index on a column that is always set to the same value, perhaps like this:

create table tinytable (dummy_pi integer, [other columns] )
primary index (dummy_pi);

create view tinytablev (columns...) as
select columns... from tinytable where dummy_pi = 1;