Re: Time complexity of statements - Mailing list pgsql-general

From Tom Lane
Subject Re: Time complexity of statements
Date
Msg-id 15084.1139930983@sss.pgh.pa.us
Whole thread Raw
In response to Time complexity of statements  (Sebastjan Trepca <trepca@gmail.com>)
List pgsql-general
Sebastjan Trepca <trepca@gmail.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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Dropping a database that does not exist
Next
From: Peter Eisentraut
Date:
Subject: Re: Time complexity of statements