go to post Eduard Lebedyuk · Nov 18, 2018 You need to write it. From docs:You can execute your custom code when certain events occur. Two steps are required: 1. Define the ^%ZSTART routine, the ^%ZSTOP routine, or both.In these routines, you can define subroutines to execute when the certain activities start or stop.^%ZSTART and ^%ZSTOP must be defined in the %SYS namespace, although they can be mapped to a non-default database.2. Use the Management Portal to configure Caché to invoke the desired subroutines.Specifically, if you define the routine ^%ZSTART and ^%ZSTOP and you include subroutines with specific names, the system automatically calls these subroutines when the activity is beginning or ending. The subroutine names are as follows:SYSTEM — Executed when Caché as a system starts or stopsLOGIN — Executed when a user performs a login or logout using the %Service_Console or Service_Telnet services.JOB — Executed when a JOB begins or endsCALLIN: — Executed when an external program begins or completes a CALLINFor example, when a system starts, the system automatically invokes SYSTEM^%ZSTART, if that is defined and if you have used the Management Portal to enable this subroutine.SYSTEM^%ZSTART and SYSTEM^%ZSTOP are run with $USERNAME set to $system and $ROLES set to %All. To run your code with a different username, use $SYSTEM.Security.Login() to set the desired name and then continue with your custom code. If you use JOB to launch any additional processes, those processes will inherit the same username (and roles) as the initiating process.Enabling %ZSTART and %ZSTOPOnce the routines have been designed, developed, compiled, and are ready to be tested, individual entry points may be enabled through the Management Portal. Navigate to the Startup Settings page by selecting System Administration, then Configuration, then Additional Settings, then Startup Settings, and edit the appropriate individual settings:SystemStart, SystemHaltProcessStart, ProcessHaltJobStart, JobHaltCallinStart, CallinHaltTo deactivate one or more of the entry points, use the same procedure but change the value to false.
go to post Eduard Lebedyuk · Nov 16, 2018 The connection should be able transfer journals faster then they are written.So it depends on how much your app writes on a primary.I'd say it easier to just try esp. with a cloud servers. Mirror creation does not take much time.
go to post Eduard Lebedyuk · Nov 16, 2018 Well the fastest would probably be custom table into which you periodically write results of this query: SELECT ID, Hash FROM %Dictionary.CompiledClass Hash in %Dictionary.CompiledClass is calculated on each class change/compilation. As in this case hashes are already calculated. Inventory iterates ^rOBJ and calculates hash.
go to post Eduard Lebedyuk · Nov 16, 2018 Yeah, there's not much info.To create inventory scan call: set in = ##class(Inventory.Scanner).RunScan("Version 1") set dbU = ##class(Inventory.DatabaseComponent).%New() do dbU.Init(in,"C:\InterSystems\Ensemble\mgr\db\CACHE.DAT") do in.RootComponent.AddComponent(dbU) set sc = in.%Save() //do in.WriteToFile("c:\Temp\scanVersion"_$tr($zdt($h,8)," :","Z")_".xml") And to get diff between two versions/times use SQL: SELECT s1.Name, s1.scan->EndTimeStamp, s2.scan->EndTimeStamp FROM Inventory.RoutineComponent s1 JOIN Inventory.RoutineComponent s2 ON s1.Name=s2.Name WHERE s1.scan=1 AND s2.scan=2 AND NOT s1.SHA1Hash=s2.SHA1Hash it would return items with hashes changed between scan 1 and 2. The same query can be further modified to accept timestamps, etc.
go to post Eduard Lebedyuk · Nov 16, 2018 Link to OE shows an error:UPD: Link should be https://openexchange.intersystems.com/index.html#!/package/IDP-DV
go to post Eduard Lebedyuk · Nov 16, 2018 I think the main point here is that it's a multi namespace query.Check out Ensemble multi namespace Event Viewer if you're interested in that kind of functionality.
go to post Eduard Lebedyuk · Nov 16, 2018 It only matters that the async node is caught up.Also you need to use SSL.It all depends on connectivity (bandwidth and lag).
go to post Eduard Lebedyuk · Nov 16, 2018 ZSTART and ZSTOP are kind of vague, how does that fit into ccontrol start and ccontrol stop. Is there any setting where this can be set to automatic?ZSTART and ZSTOP are executed on startup/shut down automatically.
go to post Eduard Lebedyuk · Nov 16, 2018 For a case with one index there are only two variables:Number of distinct valuesNumber of total records.Or is there anything else?And on a Z axis the timing.Sure in a real environment we see interference of a several indices, but here we're talking about one index and how it affects query timings.
go to post Eduard Lebedyuk · Nov 16, 2018 Use Inventory utility.It records classes and their hashes. Compare two inventory scans to get changes.
go to post Eduard Lebedyuk · Nov 16, 2018 It would create a new object.I want to update already existing object.
go to post Eduard Lebedyuk · Nov 16, 2018 Ok, then, why it is so important, why I it is not recommend to use bitmap in case of so many unique values?Bitmap indices lose efficiency with a big number of distinct values.And what should be used instead?Normal indices.Actually the question gathered a fair amount of interest. I think I would run tests and publish the results.My plan is:1. Create a class with two properties:Property Number As %Integer(MINVAL=1, MAXVAL=<DISTINCT VALUES COUNT>);Property Data As %String;2. Increase MAXVAL up by one from 2 to 20000;3. Repopulate the class with 10 000 000 values.4. Switch between Normal and Bitmap indices5. Rebuild indices.6. Purge queries.7. Tune table.8. Remount the database to purge cache.9. Run two queries 10 times:select id, by random condition on Numberselect data by random condition on number10. Write results into new table { distinct values, index type, cold run, avg run, max run}11. Go to 2.Does that pest plan makes sense? Any ideas? Should probably test on cases where index fits into globuf and where it does not.
go to post Eduard Lebedyuk · Nov 16, 2018 2% or more means less than distinct 50 values.Thank you, Robert! New value for my list. I think I got 64 once but that's a new one.UPD: Nevermind this comment.
go to post Eduard Lebedyuk · Nov 16, 2018 That's the number I hear most often (5-10k rang) when I ask about maximum number of unique values for bitmap indices.I heard from a few hundred to 20k as a max value.
go to post Eduard Lebedyuk · Nov 10, 2018 Thanks!I see it still uses $zf(-1) in latest instead of $zf(-100). I thought $zf(-1) is unavailable now.
go to post Eduard Lebedyuk · Nov 10, 2018 You need so specify your base URL as URL property and pass the parameters in a method: set sc = ..Adapter.Get(.httpResponse, "key,key2", "value", "value2") It would send the following request: GET /baseURL?key=value&key2=value2 HTTP/1.1
go to post Eduard Lebedyuk · Nov 10, 2018 Is there an easier way to get value from OS call then Input redirection?