Re: Time complexity of statements

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sebastjan Trepca <trepca(at)gmail(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Time complexity of statements
Date: 2006-02-14 15:29:43
Message-ID: 15084.1139930983@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sebastjan Trepca <trepca(at)gmail(dot)com> writes:
> As I understood from books and docs every statement in Postgres takes
> O(1) because of it's versioning system, right?

Finding an existing row is not O(1), so this is not the case for
anything but INSERT. You also have to consider index update costs,
foreign key checking costs if applicable, etc etc.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2006-02-14 15:31:30 Re: Time complexity of statements
Previous Message Tom Lane 2006-02-14 15:21:11 Re: Dropping a database that does not exist