for   
Save 
Save 
   Join IIUG  

Informix News
14 August 08 - IIUG.org - Sellout Expected for the 2009 IIUG Informix Conference... Read
29 April 08 - IntelligentEnterprise.com - IBM Informix Upgrade Enhances Clustering, Database Management... Read
29 April 08 - itweek.com - IBM 'Cheetah 2' mauls data costs... Read
28 April 08 - eWeek.com - IBM Uncages Cheetah 2 Data Server... Read
28 April 08 - CNNMoney.com - IBM Helps Clients Reduce Data Management Costs With New Informix Dynamic Server... Read
09 April 08 - CNNMoney.com - MediaSpan Embeds IBM Informix Dynamic Server Software for Delivering News to Print, Web and Wireless Devices... Read
08 April 08 - IT-Director.com - Informix seeks developers... Read
18 February 08 - marketwire.com - Icarus Studios Partners With IBM to Upgrade Performance, Availability for Its Online Games... Read
17 January 08 - eWeek.com - IBM Adds Mac Support to IDS for Higher Education... Read
17 January 08 - informationweek.com - Lotus Notes For iPhone Signals Closer Ties Between IBM, Apple... Read
16 January 08 - marketwire.com - IBM Informix Dynamic Server to Deliver Support for Mac OS X... Read
16 January 08 - internetnews.com - IBM's IDS to Support Mac Platform... Read
28 June 07 - REG Developer - IBM and Informix tie down Cheetah... Read
27 June 07 - CBRonline.com - IBM corrects its own Informix customer figures... Read
14 June 07 - vnunet.com - IBM changes spots with Informix 'Cheetah' database... Read
14 June 07 - eChannelLine - IBM expands scope for IDS... Read
14 June 07 - Resellernews - IBM: Informix database alive and kicking... Read
13 June 07 - DB2 Magazine - Cheetah is now out of the gate... Read
12 June 07 - IBM - IDS 11 release announcement (pdf)... Read
12 June 07 - ChannelWeb Network - IBM Uncages IDS 11, Aka Cheetah, Database... Read
12 June 07 - eWeek.com - IBM's 'Cheetah' Ready to Pounce... Read
12 June 07 - InformationWeek - IBM Unleashes 'Cheetah' Database... Read
12 June 07 - WebWire - IBM Strengthens Database Portfolio With New Informix Dynamic Server... Read
12 June 07 - Intelligent Enterprise - IBM Unveils Informix Upgrade... Read
12 June 07 - ComputerWeekly.com - IBM's Cheetah IDS makes leap to better data centre clustering... Read
12 June 07 - ebiz - IBM Unveils Next Generation Informix Dynamic Server... Read
12 June 07 - computerworld.com - Will 'Cheetah' help IBM's Informix chase down market share?... Read
12 June 07 - Internetnews.com - No Data Can Outrun This 'Cheetah'... Read
12 June 07 - de.internet.com - IBM neuer Datenbank-Server mit Codenamen Cheetah ist fertig... Read
12 June 07 - verifox.de - IBM stärkt Datenbank-Portfolio mit neuem Informix Dynamic Server... Read
12 June 07 - golem.de - Informix 11 vorgestellt... Read
12 June 07 - Computerwoche.de - IBM stellt neue Informix-Version vor... Read
12 June 07 - IBM.de - IBM stärkt Datenbank-Portfolio mit neuem Informix Dynamic Server... Read
12 June 07 - Heise - IBM gibt Informix 11 frei... Read
25 May 07 - Taiwan.CNET.com - Local Taiwan Informix user group established... (Chinese language) ... Read
18 May 07 - ChannelWeb Network - IBM Musters Partners For Cheetah Release... Read
18 May 07 - eWeek.com - IBM Looks to 'Cheetah' to Speed Up Blade Servers... Read
7 May 07 - DB2 Magazine - SQL Shortcuts - Use these tricks to generate IDS SQL scripts... Read

Previous news items
 

Home Member Area About IIUG


Resources
IIUG Insider
IIUG Hotspots
IBM-Informix Links
IIUG RSS Feeds
Software Repository
Informix Products
Online Resources
Informix Library
Informix Books
IIUG Banners
Discussion
Technical SIGs
Non-technical
Other Discussion
Community
Events
Webcasts/Chat w Lab
IIUG TV
IIUG Sponsors
Informix Business Directory
IIUG Press Partners
Local User Groups
Job Board
Fun Stuff

[ View Thread ] [ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

IDS Forum

Re: Locks

Posted By: ART KAGEL, BLOOMBERG/ 65E 55TH
Date: Tuesday, 21 January 2003, at 2:00 p.m.

In Response To: Locks (ELENA GROVER)


Best practice it to implement an optimistic locking protocol. Each table that
is actively updated should have a timestamp column defined as DATETIME YEAR TO
FRACTION(5) and if the table is to be fragmented create it WITH ROWID and you
should run the instance with USEOSTIME set to one (1) so that the fractional
seconds will be as accurate as your OS can make them (with USEOSTIME 0 the
engine provides only whole second resolution to the CURRENT function). When you
fetch a row for displaying for update DO NOT lock the row but fetch the
timestamp and ROWID columns along with other relevant data. When the user wants
to save changes fetch the current timestamp using the ROWID with the FOR UPDATE
clause which will lock the row (yes use ROW locks not PAGE). Compare this
timestamp with the original one and if they are the same then procede with the
update, if they differ abort the update and either display the changed row and
ask the user to apply the changes again, ask the user what to do without
redisplaying first, or you could fetch the entire row to see if the
modifications will clash with this users mods. This way no locks are held in
case the user gets a phone call or goes to lunch. An UPDATE trigger is used to
maintain the timestamp so that even manual updates performed in dbaccess will
modify the timestamp and the initial value is set by a DEFAULT CURRENT clause in
the timestamp column's definition when the table is created.

All reports should include a SET LOCK MODE TO WAIT <nseconds>; statement so
that transient locks due to updates being committed will do not cause the report
to fail with a lock error. Reports that have to be AS OF the time the report
was started should be run using ISOLATION LEVEL REPEATABLE READ reports that
must complete but must report on consistent data must use COMMITTED READ
isolation.

Art S. Kagel

----- Original Message -----
From: Elena Grover <mgroveres@yahoo.com>
At: 1/21 13:29

> I am just starting to use Informix and I have read a lot of documentation
about
> locking but I am more interested in best practices. This question is not
> specific but any recommendation or personal experience is welcome.
>
> My problem is the next, suppose that I have a table call clients with about 3
> millions of records, this table is actualized frequently and a lot of reports
> are run against it.
>
> Is the best option to use a row lock? If some user 'A' is consulting a record
> and some other user 'B' modifies the same record what can I do to refresh the
> record for the user A ? How can I assure when user 'A' and user 'B' are
trying
> to modify the same record at the same time that an update would be always
> against the new values of the record and not the values before modification
for
> another user?
>
> How can I get the best performance, high availability and assure data
> consistency, using locks? Talking about 50-100 concurrent users, tables about
> 1-10 million of records and using ANSI DB.
>
> Thank you very much.


Messages In This Thread

  • Locks
    ELENA GROVER -- Tuesday, 21 January 2003, at 12:30 p.m.
    • Re: Locks
      ART KAGEL, BLOOMBERG/ 65E 55TH -- Tuesday, 21 January 2003, at 2:00 p.m.

[ View Thread ] [ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

IDS Forum is maintained by Administrator with WebBBS 5.12.

©2001 - 2007 International Informix Users Group.   All rights reserved.     Terms of use    
*** Powered By IBM Informix Dynamic Server V10.00 ***