Interesting problem in 4GL - records missing from select
Posted in 2005
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Transactions, Locking & Isolation, Platform-Specific Issues
Hi, We are facing an issue in our informix 4gl application. Details are as follows: Environment: ------------ HP-UX 11.11 Informix 4GL 7.30.HC4P1 Informix Dynamic Server Version 9.30.HC2 Problem statement: ------------------ There are multiple instances of program running each processing separate records. The key of the records to be processed is fetched from main table, tab1 into a temporary table for a particular station code. The number of records which get inserted into the temp table are less than expected. Likely cause of the problem: ---------------------------- The program after fetching the key from the temp table, gets the detail record for this key from the main table, tab1. It then writes this record into a file after few validations. After this processing, it updates the timestamp field from NULL to some NON-NULL value in tab1 table for that key. We are suspecting that the problem mentioned above is caused due to one instance updating the records in tab1 table while other instance of the program is trying to populate the temp table for its station code from tab1 table at the same time. Details: -------- To diagnose the problem, we used logs at different points of the program. Part of logs for station SIN has been reproduced below: | 0|Before exclude_offst:tab1 count|9825| | 0|After exclude_offst:tab1 count|9825| ... | 0|No. of records in tmp_table|5005|--1--| ... The above logs indicate that the number of records returned by the count(*) query in "Before exclude_offst" and "After exclude_offst" is different than the number of records actually inserted in tmp_table table. The 'where' conditions for all the queries is same and there is no updation of the 9825 records between "After exclude_offst" and "No. of records in tmp_table". This leads to a suspicion that there could be a problem in either Informix 4GL version or IDS version we are using. Kindly raise the above issue with Informix technical support to see if our suspicion is true. Please let me know if you need any more information. Please note: (1) The cursor declared is a plain cursor and not scroll cursor and without any WITH HOLD clause. (2) The isolation is set to dirty read before opening the cursor. Even tried with committed read and set lock mode to wait. But the problem still persists and there is no error received Regards, Rajeev
> Kindly raise the above issue with Informix technical support to see if > our suspicion is true. Please let me know if you need any more > information. > Why can't you raise this issue with Informix Technical Support yopurself? or are we to pay for a support contract and log requests on yoru behalf? Why should we pay and not you?
scottishpoet wrote: >> Kindly raise the above issue with Informix technical support to see if >> our suspicion is true. Please let me know if you need any more >> information. >> > Why can't you raise this issue with Informix Technical Support > yopurself? > > or are we to pay for a support contract and log requests on yoru > behalf? > > Why should we pay and not you? > Have you tried UPDATE STATISTICS?
rajeevkartha@gmail.com wrote: > We are facing an issue in our informix 4gl application. http://www.catb.org/~esr/faqs/smart-questions.html > To diagnose the problem, we used logs at different points of the > program. > > Part of logs for station SIN has been reproduced below: > > | 0|Before exclude_offst:tab1 count|9825| > | 0|After exclude_offst:tab1 count|9825| > ... > | 0|No. of records in tmp_table|5005|--1--| All this shows is that two different SELECT statements, as yet unrevealed, produce two different result sets. That's not unusual; different SELECT statements tend to produce different result sets. You'll need to demonstrate that the two SELECT statements *should* be producing the correct answer. Your expectations might be correct, but in the absence of any code, we're faced with options (a) I4GL + IDS is not working correctly or (b) some code using I4GL + IDS is not working correctly. There's a tendency to think (b) is more plausible than (a). > Kindly raise the above issue with Informix technical support to see if > our suspicion is true. Please let me know if you need any more > information. The Scottish Poet pointed out that this not a sensible question. Of course, the fact that both the I4GL and IDS versions are non-current does not help. I'm not sure whether you could obtain support for the version of IDS any more. Certain and sure it is that you will be expected to upgrade if the problem *is* in the product; you would be most unlikely to obtain patch versions given that you don't have your own Tech Support contract in the first place. So, you could kick-start the process by upgrading to I4GL 7.32 and IDS 10.00 - and by buying Tech Support - so that you can get the problem resolved through regular channels. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/