I have a problem with live cursor and AdsQuery.Refresh If a user adds a record in a table (customers), if other users are doing a refresh of the query then the record appears. Here is the query:
But for sales orders that does not work, the refresh does not display the new lines, the query must be a close and open (which is live). Here is the query:
Is it because the order by is composed of fields of different types (CHAR and INTEGER)? If at the time of refresh, I bind the table GCMD to the query by the datasource, the new record is displayed, but my query is configurable, so I can not link a table. Do you have any idea where is the problem? |
I suspect that the difference is that the CUSTOMER table has an existing index on IDENTIFICATION. When another user adds a record to that table, that index is automatically updated. When the first user refreshes the grid or scrolls through the data, it will use the modified index and the new record would be visible. [Assumption: The newly added record in the second table meets the WHERE clause condition.] If the assumption is true, then there probably is not an existing index on the fields JOURNAL;PREFER;REFERENCE. So in that case, the query engine will create a temporary index to order the results. That index is only visible to the user running the query so it would not be updated by other users modifying the table. Thus the first user would not see a newly added record. Edit If there is an index that matches the ORDER BY clause (as stated in the comments), it is possible that ADS will still create a temporary index for efficiency reasons. If the WHERE clause filters the table such that only a small percentage of records pass, it is often faster to create a temporary index on the filtered result. It is possible that happened in this case. Thanks for your suggestion There is an index JOURNAL; PREFREF; REFERENCE which is the primary key of the table, but I am not certain that the query uses that index. There he has a chance to do a refresh of the query without an OPEN / CLOSE? if I made a close/open, I lose the muti-select on the grid tied and my batch processing no longer works
(10 Aug '14, 23:23)
mgr
did you try to remove the numeic part of the ORDER BY?
(21 Aug '14, 21:36)
Günter Kieni...
Is it possible to prevent ADS from creating an temporary index?
(04 Feb '15, 07:07)
Dontenwill_Max
|
Is it possible to prevent ADS from creating an temporary index? |