I think I got a bit closer.

When adding the DSTIME (Auto) parameter to a class according to the below, I indeed get the actions recorded in ^OBJ.DSTIME class.

Parameter DSTIME As STRING [ Constraint = ",AUTO,MANUAL", Flags = ENUM ] = "AUTO";

However, there are two exceptions:

  • The timestamp is not recorded (Highlighted in Red)
  • This works only for classes with Cache storage type. Changes in classes with SQL storage type are not recorded.

@Evgeny Shvarov

Hi Evgeni,

Unfortunately, I can't rely on updating existing globals because our whole system is very complex.

I am looking for a class attribute that automatically detects once a line was created/updated an stores the timestamp.

Is such a thing available?

Thanks!

Thanks!

If you can explain a bit about batching process, or direct to posts you think are relevant, it will be much appreciated.

I am struggling to find relevant information.

Hi Chris,

Thanks for responding.

I tried adding the DSTIME property to a class accordingly:

Property DSTIME As %Library.Integer;

But I get mapping error (My class has SQL storage map). What am I missing here? Should it be mapped somehow, or is it a special definition to make this field automatically populated?

Thanks

Hi Brendan,

I did check the query plan now, and bitmap index does not seem to work.

Based on your post, I made the following changes:

  • Changed the type of IDKey property to be integer (It indeed contains numbers only),
  • Changed the Index property collation to Exact
    • Indexed property is a status code that contain around 10 unique values

but query plan remains as is.

What else can I be missing here? 

*I don't seem to be able to upload the class here, but I sent it to your email.

By 'Normal index',  you mean the second approach I mentioned (Index data map on a pointer)?

I created a bitmap index for a field that has around 50 unique values, but when I run SQL query on that field it is failing to perform due to timeout. What can be the reason for it?

Many thanks!

Use this method for reading the file:

ClassMethod ReadFile()
{
       set stream=##class(%Stream.FileCharacter).%New()
       set sc=stream.LinkToFile("c:\test.csv")
      do stream.Rewind()
       while 'stream.AtEnd {
                 set line=stream.ReadLine()
                 W line,!
        }
}

 

***Make sure that the path of the file is on the computer that runs cache instance