Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group