From: | Catalin Constantin <catalin(at)bounce-software(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: performance for insert / update |
Date: | 2005-06-28 13:17:24 |
Message-ID: | 194920161.20050628161724@bounce-software.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Relyea, Mike | 2005-06-28 13:56:04 | Re: automating backup ? |
Previous Message | Zlatko Matic | 2005-06-28 13:07:42 | Re: automating backup ? |