go to post Vitaliy Serdtsev · Aug 21 import iris # first, we connect to the %SYS namespace conn = iris.connect('localhost:1972/%SYS','_SYSTEM',pwd,10,True) irispy = iris.createIRIS(conn) # here we switch to the USER namespace newNameSpace = irispy.classMethodString('%SYSTEM.Process','SetNamespace','USER') # now we can call the method from the new namespace #print(irispy.classMethodInteger('DC.Unix','RoundPosixToSeconds',1154669852181849976)) conn.close()
go to post Vitaliy Serdtsev · Aug 15 #Include %sqlx set newposix = $$$sqlxPosixTimeEncode(+$p($$$sqlxPosixTimeDecode(posix),".",1))Сheck: for posix = 1154669852181849976, -6979664624441081856, 1406323805406846975 { set newposix = $$$sqlxPosixTimeEncode(+$p($$$sqlxPosixTimeDecode(posix),".",1)) write ##class(%PosixTime).LogicalToTimeStamp(posix),!, ##class(%PosixTime).LogicalToTimeStamp(newposix),!! } 2025-05-27 12:06:15.003 2025-05-27 12:06:15 0001-01-01 00:00:00 0001-01-01 00:00:00 9999-12-31 23:59:59.999999 9999-12-31 23:59:59
go to post Vitaliy Serdtsev · Aug 11 source code of dc.observation_lab Class dc.a Extends %Persistent [ SqlTableName = observation_lab ] { Index iCode On code; Index iCodeText On codetext; Property code As %String(MAXLEN = 2000); Property codetext As %String(MAXLEN = 2000) [ SqlFieldName = code_1_text ]; /// d ##class(dc.a).Test() ClassMethod Test(N = {5e6}) { s t=$zh d DISABLE^%NOJRN k ^dc.aD,^dc.aI f i=1:1:N s c=i-1#1000+1,^dc.aD(i)=$lb("",c,"code_1_text_"_c) s ^dc.aD=N d ENABLE^%NOJRN w "(time) insert = ",$zh-t,! s t=$zh d ..%BuildIndices(,,,$$$NO) w "(time) %BuildIndices = ",$zh-t,! s t=$zh d $system.SQL.TuneTable("dc.observation_lab",,1,,,,,,,"100%") ;&sql(TUNE TABLE dc.observation_lab %SAMPLE_PERCENT '100%') w "(time) tune table = ",$zh-t,! } } The following query does not use iCode/iCodeText indexes (2025.2.CE): select code_1_text, count(code_1_text) from dc.observation_lab group by code_1_text order by 2 desc PS: if possible, I would try to convert the text into a number in some way and index this number already, perhaps even with the bitmap type.
go to post Vitaliy Serdtsev · Aug 4 I think this should be addressed to the WRC rather than the Ideas Portal. Also, @Robert Cemper has already registered WRC #1002589 and @Evgeny Shvarov most likely has too.
go to post Vitaliy Serdtsev · Aug 4 I completely agree with you.👍 I hope someone from InterSystems will pay attention to your post. PS: and in addition, it would also be nice to solve the issue with %FromOref(): either the code or the documentation needs to be fixed. On version 2025.2.CE it still doesn't work.
go to post Vitaliy Serdtsev · Aug 4 How to Change Your Primary Email Address on Developer Ecosystem Resources
go to post Vitaliy Serdtsev · Aug 4 Here explained to us that this is not a bug, but a feature: <PROTECT> *Function not allowed in IRIS Native python Starting from 2024.1 IRIS Native disallows routine invocations. Please use class methods instead. For reference, these changes can be identified as DP-422635 and DP-424156. PS: and yes, additional roles and resources like %Native_*/%All etc. no eliminate the <PROTECT> error. Checked on version 2025.2.CE
go to post Vitaliy Serdtsev · Jul 16 Very strange syntax: But if we tried at once with a single statment with a select into (1 value) it fails INSERT INTO Sample.YoungPeople (PASReligionCode) values (SELECT internalPatientNumber FROM Pennine_TIE_Clinicom_Link.PMISPECIALREGNCA where InternalPatientNumber=100) See: Insert Data from Another Table Using a SELECT Query %SYSTEM.SQL.Schema:CreateLinkedTable() Defining a Table by Querying an Existing Table %SYSTEM.SQL:QueryToTable()deprecated %SYSTEM.SQL.Schema:QueryToTable()deprecated
go to post Vitaliy Serdtsev · Jun 30 There was something similar: Event onPostDispatch %CSP.Rest or similar
go to post Vitaliy Serdtsev · Jun 30 Yes. Or you can immediately increase the logical size of the IRISTEMP to the desired value, for example: %SYS>set status=##class(Config.Databases).Get("IRISTEMP",.props) %SYS>set status=##class(SYS.Database).ModifyDatabase(props("Directory"),5*1024) ; 5GbIn this case, you will immediately increase the size from 240Mb to 5Gb, bypassing many small expansions.
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 24 I would like to see a small code example to understand how to help you. According to the documentation%Projection.AbstractProjection, there is a parameter DisableMulticompile and methods EndCompile, QueueClass. Do you somehow use them in your code?
go to post Vitaliy Serdtsev · Jun 13 I simplified the code a bit for testing: ROUTINE ztest23 Version() quit 20250613 ; ; do init^ztest22(100) ; in one irissession ; ; in another irissession: ; do test^ztest23() ; test(N=1E7) public { do runOne^ztest23("convertInRunFar",N,.dt1), runOne^ztest23("convertInBigMacFar",N,.dt2) write $fnumber(dt2-dt1*100/dt1,"",2)_"% difference",! } runOne(pLabel,N=1E7,&dt) public ; kill dt do runOne^ztest23("convertInRunFar",1E7,.dt) { if pLabel="convertInRunFar" { set comment="looping $$convertIn^ztestLib (far)" }else{ set comment="%New^ztestBigMac, looping $$convertIn^ztestLib (far)" set convertName=$$%New^ztestBigMac() } set convertIny=$zconvert("Маленькая умная Коричневая Лиса прыгает через лежащую сонную Пятнистую Собаку","o","UTF8") set dt0=$zhorolog for i=1:1:N set convertInx="" set dt0=($zhorolog-dt0) set dt1=$zhorolog for i=1:1:N set convertInx=$$convertIn^ztestLib(convertIny,"UTF8") set dt=($zhorolog-dt1-dt0)*1E6,dt=dt/N write pLabel,?30,$fnumber(dt,"",3),?45,comment,! }
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 Recently I noticed under some posts that there seem to be comments (count > 0), but there are no comments or their number does not correspond to the actual one. Is this related to AI Bot?
go to post Vitaliy Serdtsev · Jun 11 Unlike SQL, which has hints, IRIS Object Script has nothing similar. The only thing left to do is to tweak these settings. If you already have everything tuned, then probably the only thing left is to contact the WRC. PS: Having a reproducible example here would be a big help with the experiments. I love detective problems like this :)
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 Try increasing the values for some parameters from the section Advanced Memory Settings: bbsiz, gmheap, history, locksiz, routines, etc.
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> }