Re: Maximum number of sequences that can be created - Mailing list pgsql-performance

From Віталій Тимчишин
Subject Re: Maximum number of sequences that can be created
Date
Msg-id CABWW-d1GD9qg0gDMDmpgu=j478r-0Ktbi8U=iELj0Jmo+Mk_ig@mail.gmail.com
Whole thread Raw
In response to Re: Maximum number of sequences that can be created  (Robert Klemme <shortcutter@googlemail.com>)
Responses Re: Maximum number of sequences that can be created
Re: Maximum number of sequences that can be created
List pgsql-performance


2012/5/11 Robert Klemme <shortcutter@googlemail.com>
On Fri, May 11, 2012 at 12:50 PM, Vidhya Bondre <meetvbondre@gmail.com> wrote:
> Is there any max limit set on sequences that can be created on the database
> ? Also would like to know if we create millions of sequences in a single db
> what is the downside of it.

The sequences AFAIK are accounted as relations. Large list of relations may slowdown different system utilities like vacuuming (or may not, depends on queries and indexes on pg_class).
 

On the contrary: what would be the /advantage/ of being able to create
millions of sequences?  What's the use case?


We are using sequences as statistics counters - they produce almost no performance impact and we can tolerate it's non-transactional nature. I can imaging someone who wants to have a  sequence per user or other relation row. 

--
Best regards,
 Vitalii Tymchyshyn

pgsql-performance by date:

Previous
From: Jessica Richard
Date:
Subject: ...
Next
From: Robert Klemme
Date:
Subject: Re: Maximum number of sequences that can be created