go to post Vitaliy Serdtsev · Jun 27 Display Free Space Information Using the Management Portal Size The current allocated size of the database, in megabytes. Note: This field measures the logical size of the database. As a result, the size reported here may be lower than the physical size of the database, in particular for the IRISTEMP database. Look at MaxIRISTempSizeAtStart
go to post Vitaliy Serdtsev · Jun 12 IRIS 2025.1 CE I made 4 launches in a row - the result fluctuates greatly: USER>set N=1E7 do runOne^ztest22("convertInRunFar",N,.fields) set dt1=$get(fields("dt")) do runOne^ztest22("convertInBigMacFar",N,.fields) set dt2=$get(fields("dt")) w $fn(dt2-dt1*100/dt1,"",2)_"% difference",! convertInRunFar 0.473 looping $$convertIn^ztestLib (far) convertInBigMacFar 0.478 %New^ztestBigMac, looping $$convertIn^ztestLib (far) 1.13% difference USER>set N=1E7 do runOne^ztest22("convertInRunFar",N,.fields) set dt1=$get(fields("dt")) do runOne^ztest22("convertInBigMacFar",N,.fields) set dt2=$get(fields("dt")) w $fn(dt2-dt1*100/dt1,"",2)_"% difference",! convertInRunFar 0.474 looping $$convertIn^ztestLib (far) convertInBigMacFar 0.598 %New^ztestBigMac, looping $$convertIn^ztestLib (far) 25.99% difference USER>set N=1E7 do runOne^ztest22("convertInRunFar",N,.fields) set dt1=$get(fields("dt")) do runOne^ztest22("convertInBigMacFar",N,.fields) set dt2=$get(fields("dt")) w $fn(dt2-dt1*100/dt1,"",2)_"% difference",! convertInRunFar 0.461 looping $$convertIn^ztestLib (far) convertInBigMacFar 0.597 %New^ztestBigMac, looping $$convertIn^ztestLib (far) 29.70% difference USER>set N=1E7 do runOne^ztest22("convertInRunFar",N,.fields) set dt1=$get(fields("dt")) do runOne^ztest22("convertInBigMacFar",N,.fields) set dt2=$get(fields("dt")) w $fn(dt2-dt1*100/dt1,"",2)_"% difference",! convertInRunFar 0.511 looping $$convertIn^ztestLib (far) convertInBigMacFar 0.551 %New^ztestBigMac, looping $$convertIn^ztestLib (far) 7.88% difference USER> I'm afraid we can't do without the WRC.
go to post Vitaliy Serdtsev · Jun 12 See Zen Layout, Zen Style Class dc.test Extends %ZEN.Component.page { XData Style { <style type="text/css"> #mss { width:200px; height:100px; overflow:auto; border:2px solid DeepPink; background-color: #E5E5E5; } a.multiSelectSetCaption { color: blue; font-family: Verdana; font-weight: bold; } </style> } XData Contents [ XMLNamespace = "http://www.intersystems.com/zen" ] { <page xmlns="http://www.intersystems.com/zen"> <multiSelectSet id="mss" sql=" select 1 id,'Apple' name union select 2,'Banana' union select 3,'Cherry' union select 4,'Peach' union select 5,'Peach' union select 6,'Cherry' union select 7,'Banana' union select 8,'Apple'" /> </page> } }
go to post Vitaliy Serdtsev · Jun 11 Class dc.test Extends %ZEN.Component.page { ClientMethod selectMulti() [ Language = javascript ] { var values = zenPage.GetValues() zenSetProp('mss','value',values); } ClassMethod GetValues() As %String [ ZenMethod ] { ; here select data according to a certain condition &sql( select LIST(id) into :r from (select 1 id,'Apple' name union select 2,'Banana' union select 3,'Cherry' union select 4,'Peach') where name['a' ) quit r ; return 2,4 } ClientMethod saveMulti() [ Language = javascript ] { var values = zenGetProp('mss','value'); zenPage.SaveValues(values); } ClassMethod SaveValues(values) [ ZenMethod ] { set ^fruits=values } XData Contents [ XMLNamespace = "http://www.intersystems.com/zen" ] { <page xmlns="http://www.intersystems.com/zen"> <button caption="Select All" onclick="zen('mss').selectAll()"/> <button caption="Select based on data from the database" onclick="zenPage.selectMulti();"/> <button caption="Save" onclick="zenPage.saveMulti();"/> <multiSelectSet id="mss" sql="select 1 id,'Apple' name union select 2,'Banana' union select 3,'Cherry' union select 4,'Peach'" /> </page> } }
go to post Vitaliy Serdtsev · Jun 11 See Query Parameters XData Contents [ XMLNamespace = "http://www.intersystems.com/zen" ] { <page xmlns="http://www.intersystems.com/zen"> <multiSelectSet sql="select 'Apple' union select 'Banana' union select 'Cherry'" /> </page> }
go to post Vitaliy Serdtsev · Jun 9 Let's suppose two different routines use one and the same chunk of code. From the object-oriented POV, a good decision is to have this chunk of code in a separate class and have both routines call it. However, whenever you call code outside of the routine as opposed to calling code in the same routine, some execution speed is lost. For reports churning through millions of transactions this lost speed might be noticeable. Any advice how to optimize specifically speed? What you are asking is very similar to Inline function in C. In Caché, macros and/or preprocessor directives are great for this role. Especially if the code size is small: ObjectScript Macros and the Macro Preprocessor In this case you will avoid the overhead of calling goto, do, job, xecute, etc. Example (procedure "swap") Class dc.a Extends %RegisteredObject { ClassMethod swap( ByRef x, ByRef y) { s tmp=x,x=y,y=tmp } /// d ##class(dc.a).Test() ClassMethod Test(N = {1e7}) { #define swap(%x,%y) s ##unique(new)=%x,%x=%y,%y=##unique(old) s a=3,b=7 s t=$zh f i=1:1:N s tmp=a,a=b,b=tmp w "inline procedure",?20,$zh-t," sec",! s t=$zh f i=1:1:N d swap w "just a procedure",?20,$zh-t," sec",! s t=$zh f i=1:1:N $$$swap(a,b) w "macros procedure",?20,$zh-t," sec",! s t=$zh f i=1:1:N d ..swap(.a,.b) w "class method",?20,$zh-t," sec",! swap() s tmp=a,a=b,b=tmp } } ;dc.a.1 ;Generated for class dc.a. Do NOT edit. 09.06.2025 00:00:00PM ;;00000000;dc.a ; Test(N) methodimpl { s:'($d(N)#2) N=1e7 s a=3,b=7 s t=$zh f i=1:1:N s tmp=a,a=b,b=tmp w "inline procedure",?20,$zh-t," sec",! s t=$zh f i=1:1:N d swap w "just a procedure",?20,$zh-t," sec",! s t=$zh f i=1:1:N s %mmmu1=a,a=b,b=%mmmu1 w "macros procedure",?20,$zh-t," sec",! s t=$zh f i=1:1:N d ..swap(.a,.b) w "class method",?20,$zh-t," sec",! swap() s tmp=a,a=b,b=tmp } swap(x,y) methodimpl { s tmp=x,x=y,y=tmp } When implementing a sorting algorithm doing lots of swaps, this can increase the execution speed. PS: And yes, avoid passing input/output parameters and class methods due to the high overhead of calling them.
go to post Vitaliy Serdtsev · Jun 6 CREATE FUNCTION inLike(str VARCHAR(50), lstLike VARCHAR(50)) RETURNS BIT PROCEDURE LANGUAGE OBJECTSCRIPT { set res = 0, ptr = 0 while $listnext(lstLike,ptr,v) { &sql(select case when :str like :v then 1 else 0 end into :like) if like { set res = 1 quit } } quit res }Usage: select * from CustomersTable where inLike(CustomerName,$LISTBUILD('%Mark%','%John%','%an%'))=1
go to post Vitaliy Serdtsev · Jun 4 Has it worked before? If so, then most likely there were some changes in the OS at the file/registry level. First, try to run on the command line (see Registering Files): >cd D:\DHC\DEVSOFTWARE\ENSEMBLE\BIN D:\DHC\DEVSOFTWARE\ENSEMBLE\BIN>RegFiles.bat ALL If it doesn't help, try select Repair to repair problems with the instance such as missing or corrupt files or registry entries: Reinstalling or Uninstalling Caché
go to post Vitaliy Serdtsev · May 19 If that's correct, is there a way to configure the JDBC connection to interpret this data using EUC-KR encoding? No: Caché JDBC Connection Properties But even if JDBC had encoding settings, it wouldn't help you, because the 8-bit version of Caché doesn't support Korean and doesn't know anything about EUC-KR/KSC5601. PS: I would consider switching to the Unicode version of Caché, which already has support for the Korean language.
go to post Vitaliy Serdtsev · Mar 10 IRIS for Windows (x86-64) 2024.3 (Build 217U) Thu Nov 14 2024 17:59:58 EST Or "Include EnsUtil" Now you can do it like this: ##class(%BigData.ShardedSQL).ClassNameToTableName(pClassName)
go to post Vitaliy Serdtsev · Feb 28 See Class Reference: Class %Stream.FileBinaryGzip Extends FileBinary Class %Stream.FileBinary Extends %Stream.Object Hence %Stream.FileBinaryGzip is already the heir of %Stream.Object.
go to post Vitaliy Serdtsev · Feb 4 C:\Program Files\Python313\python3.dll Here is exactly the version 3.9.13, and not 3.13?
go to post Vitaliy Serdtsev · Feb 4 I was interested and I decided to check: USER>w $zv IRIS for Windows (x86-64) 2024.3 (Build 217U) Thu Nov 14 2024 17:59:58 EST USER>d $System.Python.Shell() Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32 Type quit() or Ctrl-D to exit this shell. >>>
go to post Vitaliy Serdtsev · Feb 4 Only InterSystems developers can fix the generated code. To do this, contact the WRC. You and I can only work around the bug by rewriting the query.
go to post Vitaliy Serdtsev · Feb 4 I installed Python 3.12.8 (x64) and configured it according to the documentation (link is given above) Everything is working fine: USER>do $System.Python.Shell() Python 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)] on win32 Type quit() or Ctrl-D to exit this shell. >>>By the way, I didn't touch PythonPath.
go to post Vitaliy Serdtsev · Jan 27 The query can be yet simplified: insert or update myTable(name,counter) select 'Omer', nvl((select counter from dc.myTable where name='Omer') + 1, 1)
go to post Vitaliy Serdtsev · Jan 23 And if so? insert or update myTable(name,counter) select 'Omer', case when exists(select * from myTable where name='Omer') then (select counter from myTable where name='Omer') + 1 else 1 endThe "name" field is assumed to be unique.
go to post Vitaliy Serdtsev · Oct 11, 2024 I checked on the version "IRIS 2024.2CE for Windows" - the file is deleted from the SOURCFILE. Maybe it's about the access rights to delete? Check it out: Step 6: Determine Owners and Groups UNIX® Users, Groups and Permissions
go to post Vitaliy Serdtsev · Jun 24, 2024 Try this example Class User.myclass Extends %Persistent { Property myVECTOR As %Vector(CAPTION = "Vector", DATATYPE = "INTEGER"); Property myProperty As %String(MAXLEN = 40) [ Required ]; ClassMethod GetEmbedding1(sentences As %String) As %String { q "2,4,6,8" } ClassMethod GetEmbedding2(sentences As %String) As %DynamicObject { q [1,3,5,7,9] } ClassMethod Test() { d ..%KillExtent() set data=##class(User.myclass).%New() set data.myProperty ="anything 1" set data.myVECTOR=##class(User.myclass).myVECTORDisplayToLogical(##class(User.myclass).GetEmbedding1("this is my text")) d $system.OBJ.DisplayError(data.%Save()) ; OR set data=..%New() set data.myProperty ="anything 2" set data.myVECTOR=data.myVECTORDisplayToLogical(..GetEmbedding2("this is my text")) d $system.OBJ.DisplayError(data.%Save()) zw ^User.myclassD } } USER>d ##class(User.myclass).Test() ^User.myclassD=2 ^User.myclassD(1)=$lb("",{"type":"integer", "count":4, "length":4, "vector":[2,4,6,8]} ; <VECTOR>,"anything 1") ^User.myclassD(2)=$lb("",{"type":"integer", "count":5, "length":5, "vector":[1,3,5,7,9]} ; <VECTOR>,"anything 2")
go to post Vitaliy Serdtsev · Apr 4, 2024 select lpad(s\3600,2,0)||':'||lpad(s\60#60,2,0)||':'||lpad((s)#3600#60,2,0) diff from (select DATEDIFF('s','2024-04-01 09:13:46','2024-04-01 11:11:44') s)