Search Postgresql Archives

Re: Could postgres12 support millions of sequences? (like 10 million)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Mar 19, 2020, at 6:45 PM, pabloa98 <pabloa98@xxxxxxxxx> wrote:



On Thu, Mar 19, 2020 at 5:13 PM Adrian Klaver <adrian.klaver@xxxxxxxxxxx> wrote:
On 3/19/20 3:32 PM, pabloa98 wrote:
> 
> 
> On Thu, Mar 19, 2020 at 3:17 PM Rob Sargent <robjsargent@xxxxxxxxx 
> <mailto:robjsargent@xxxxxxxxx>> wrote:I have a table called "pair":

CREATE TABLE pair(
group INT NOT NULL,
element INT NOT NULL,
CONSTRAINT PRIMARY KEY (group, element)
);

I must add entries to the table "event". This table event will have a code that will be generated using a sequence of that is a function of s(group,element). 
CREATE TABLE event(
group INT NOT NULL,
element INT NOT NULL,
code INT NOT NULL,
CONSTRAINT PRIMARY KEY(code, element, group)
);

Unless event table is searched by code more than group, you probably want to maintain the key order from the pair table's primary key.

If gaps are ok do you still near multiple sequences?



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux