Re: online table update?
Posted in 1997
This is true, but if you use the dbload utility you can make it commit
for every x rows loaded. It can also load to tables that are quite
different from you datafile, while the load statement requires the
load file and the table to have exactly the same fields.
It's also very easy to write a program that does the loading (in 4GL -
with extra file I/O library, ESQL/C or any of many other languages) to
gain even more control over what is going on.
Ian Goddard <igoddard@netcomuk.co.uk> wrote:
:Ofer Inbar wrote:
:>
:> I'm familiar with Oracle 7 but new to Informix 7.
:>
:> The server in question will be serving data Web/CGI users, and will be
:> receiving updates from a remote site every few minutes. The remote
:> data will come in as comma delimited ASCII.
:>
:> 1) Is there an Informix 7 equivalent of Oracle's SQL*Loader to load
:> this data in?
:
:See the manual page on the LOAD statement. The default delimiter is "|"
:but this can be varied if needed.
:
:> 2) Can the database continue serving data to the Web users while the
:> tables are being updated with the new data?
:
:Yes, but ....
:
:If you do the loads inside a transaction (so you can roll back if the
:database chokes on a line, e.g. if one of your data fields contains a
:comma and upsets the column count) you will impose locks (page or row
:depending on the lock mode of the table). If you have a lot of rows you
:may run out of locks. In this case you will need to:
:1. Split the load file into smaller portions.
:2. Increase the size of the lock table or
:3. Lock the whole table.
:
:Clearly option 3 may cause a problem in continuing to serve pages. Even
:if you adopt option 2 the users may start running into the locked rows.
:Moral: if you want to keep serving users, load the rows in small
:batches.
:
:Ian
Nils.Myklebust@idg.no
NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway
My opinions are those of my company
The Informix FAQ is at http://www.iiug.org