Re: Performance implications of creating many, many sequences

From: Michael Gardner <gardnermj(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Performance implications of creating many, many sequences
Date: 2010-10-22 20:01:53
Message-ID: 9E98FEDA-1BDD-4D5A-8EBE-E2ED4C0F5CB3@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Oct 22, 2010, at 2:50 PM, Rob Sargent wrote:

> Is this "invoice_number" just an id or what might appear an a bill (in
> some pretty form etc)?

It will appear on actual invoices, as part of a compound invoice identifier (like ABCD-0042, where ABCD is an identifier for the account in question and 42 is the invoice number).

> If the former, just get a unique id over all invoices. At the very
> least it will save time i) in writing where clauses ii) re-creating the
> correct id once some one assigns an invoice to the wrong customer.

There will be such an ID, but I do not want to show it directly to users. I want an invoice number independent of whatever surrogate key the database happens to use to uniquely identify rows.

(Sorry if you receive this twice, Rob. I accidentally replied to you instead of the list the first time.)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andre Lopes 2010-10-22 20:29:00 Tools for form generation in PHP/HTML from database models/queries
Previous Message Rob Sargent 2010-10-22 19:50:26 Re: Performance implications of creating many, many sequences