Re: Maximum number of sequences that can be created

From: Robert Klemme <shortcutter(at)googlemail(dot)com>
To: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Maximum number of sequences that can be created
Date: 2012-05-13 10:56:20
Message-ID: CAM9pMnOCKEEKbvhtLoTym9cY9xspr3S12V6bWbcsQxtHsyzMGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sun, May 13, 2012 at 10:12 AM, Віталій Тимчишин <tivv00(at)gmail(dot)com> wrote:
> 2012/5/11 Robert Klemme <shortcutter(at)googlemail(dot)com>

>> 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.

I can almost see the point. But my natural choice in that case would
be a table with two columns. Would that actually be so much less
efficient? Of course you'd have fully transactional behavior and thus
locking.

Kind regards

robert

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Clemens Eisserer 2012-05-13 14:35:30 Re: Any disadvantages of using =ANY(ARRAY()) instead of IN?
Previous Message Віталій Тимчишин 2012-05-13 08:12:58 Re: Maximum number of sequences that can be created