О, если постгрес, то про шардинг прямо сюда http://www.postgresql.org/docs/9.0/interactive/ddl-partitioning.html