My dostats.ec utility
Posted in 1997
A brief word of explanation and clarification. I stated that my utility, dostats, which updates statistics on one or many databases/tables according to the best recommendations I have, will work for any version of Informix (ie 5,6,7). This is strictly true, however, it uses multiple connections so there are three restrictions. 1) It must be compiled with ESQL/C 7.xx+. 2) The connection to the server must be a socket or network connection. It will not work with a shared memory connection. There is a '-h servername' option if INFORMIXSERVER is a shared memory connection. 3) The -h option can be used to update stats for 5.0x and 6.00 servers and for remote servers but dostats must have a 7.xx runtime environment. There are options to manually specify that 5.0x or 6.00 syntax is to be used, 7.xx syntax options are used by default. Dostats also tries to detect 5.0x servers and will adjust its options accordingly. It tries to detect 6.00 and adjust also, though this does not always work. Skilled ESQL/C programmers could easily remove the 7.xx'isms and make dostats work in a strictly 5.0x environment (after all it was originally written for 5.06). Anyone cursed with a 6.00 installation (yes I still have one 6.00 production instance and one 6.00 data entry staging instance) can do the same. However, if you have a 7.xx instance anywhere it is probably not worth the effort as dostats runs just as quickly remotely as locally since it only fetches table, column and index information. Happy Databasing Art S. Kagel