Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f8AFX5767461 for ; Mon, 10 Sep 2001 11:33:06 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f8AFSAP60983 for pgsql-sql@postgresql.org; Mon, 10 Sep 2001 11:28:10 -0400 (EDT) (envelope-from news) From: "Jeff Barrett" X-Newsgroups: comp.databases.postgresql.sql Subject: row level locking? Date: Mon, 10 Sep 2001 11:25:07 -0400 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 21 Message-ID: <9nim69$1rhk$1@news.tht.net> X-Complaints-To: scrappy@hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 To: pgsql-sql@postgresql.org X-Archive-Number: 200109/34 X-Sequence-Number: 4680 I have an update statement (no transaction controls surround these statements): update sessions set sessdate = 0 where sessid in ( long list of ids); How long will the rows being updated be locked for this statement? Will all be locked until all updates are completed or will the row locking only occur for each row being updated? If I have a statement like: update sessions set sessdate = 0 where datetime < 10000; (this would be the same criteria that created the list used above) How long will each row be locked for? These queries can be updating a good number of rows ( > 10,000) every 10 minutes and I need to figure out how signifigant of an impact the locking occuring in those updates can be.