Re: performance for insert / update - Mailing list pgsql-general

From Catalin Constantin
Subject Re: performance for insert / update
Date
Msg-id 194920161.20050628161724@bounce-software.com
Whole thread Raw
In response to Re: performance for insert / update  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-general
this is my "schema" for the table with the "issue" !

# \d url_importance
                   Table "public.url_importance"
  Column   |       Type       |              Modifiers
-----------+------------------+-------------------------------------
 url_id    | bigint           | default nextval('url_id_seq'::text)
 links_in  | integer          | default 0
 links_out | integer          | default 0
 rank      | double precision | default 0
Indexes:
    "ak_url_id_key_url_impo" unique, btree (url_id)
Foreign-key constraints:
    "fk_url_impo_reference_url" FOREIGN KEY (url_id) REFERENCES url(url_id) ON UPDATE CASCADE ON DELETE CASCADE


based on this table i calculate the "rank" for each page and the
reupdate the table.

on update it takes QUITE a lot time to make the update.

basically i am updating just a number which sould not be that resource
consuming !

is upgrading to 8.X a "solution" in this case ?

p.s.: i am not updating anything except the rank column !

Tuesday, June 28, 2005, 4:01:02 PM, Bruno Wolff III wrote:
> Do you have indexes on the foreign key fields in the referencing tables?
> These are created by default and if you are updating the referenced tupples
> a sequential search will be needed if there isn't an index.

> Also of note is that there is recent a change to only do this if the referenced
> fields in the record are changed, but I think this is new for 8.1. That
> will make things go a lot faster if you aren't updating the referenced
> fields in your main table.


--
Catalin Constantin
Bounce Software
http://www.bounce-software.com
http://www.cabanova.ro


pgsql-general by date:

Previous
From: "Zlatko Matic"
Date:
Subject: Re: automating backup ?
Next
From: "Relyea, Mike"
Date:
Subject: Re: automating backup ?