O.K. so I'm nearly 3 years replying to this post but none the less......
I agree that tune tables is a very necessary and useful tool in order to improve query performance.
Where it does fail in my opinion, much to my disappointment is that the tune table data is stored within the actual class rather than elsewhere. This causes a major tune table flaw for classes that are mapped over 2 or more namespaces as the tuning needs for one namespace could and often is completely different for the tuning needs of the other namespace.
Are you aware of any ways to get around this problem please?
It would seem that your REGINUS database expansion size has been set to 1000, this can be checked via the SMP using System->Configuration->Local Databases and clicking on the relevant database link.
I would hazard a guess that your cachetemp database has an expansion size of 0 which is the system default hence why it is growing at a lesser rate.
If you run ^%GSIZE in the relevant namespaces then you will be able to see which globals are taking up so much space.
There is of course the possibility that you had work objects/globals being created that have since been deleted and therefore you could have a lot of empty space in your database. This can be resolved using both Database Compact and Truncate. These options can be found in the SMP under System->Databases and clicking on the relevant database link.
I personally would dismount and then take a duplicate copy of the relevant IRIS.dat or Cache.dat at an OS level, then mount them both as separate databases.
I would then delete the globals from 1 and then the the routines/classes from the other.
Then remove any inapropriate namespace mappings if necessary.
Not sure if any of the replies are resolving your issue yet but a long winded but definite way of achieving your goal would be to load the data values into a incrementing global i.e. set ^SQLWK($i(SQLWKvariable))=SQL values. You can then run down the global instead of your query result set.
Thanks for this link and the work that you have performed on it. Are there any installation instructions that go with this code and set of commands as I'm confused as to what order to add/process each file and on which server to apply which files.
I agree. We use a UnitTest package for everything UnitTesty. We keep all of the UnitTest classes in a UnitTest namespace/database and map them to our live namespaces.
I'm not too sure about accessing different namespaces via SQL but you can use a variety of %ResultSet objects but personally I prefer using an SQL cursor with SQL open, fetch to iterate through the object.
My 'personal' reasons for preferring SQL cursors is that they are extremely fast to develop but more importantly if you add/remove indices in the target class then the class that uses the cursor will use the best available indices without requiring re-compilation unlike at least some of the %ResultSet methods.
go to post
Ive never tried the CTRL+ options before but teh CYRL+/ didnt work for me either.
Im not sure that keyboard shortcuts is what you are asking for though as /* comments out anything below it and */ terminates the commented lines i.e,
set A=1
/*
set A=2
set B=A
*/
write A // (which now equals 1)
write B // (which now causes an error)
quit
go to post
Thank you both :-)
go to post
Hi Robert,
No I'm going to try again but with IRIS instead of Cache.
Thanks for asking
go to post
Hi Kyle,
O.K. so I'm nearly 3 years replying to this post but none the less......
I agree that tune tables is a very necessary and useful tool in order to improve query performance.
Where it does fail in my opinion, much to my disappointment is that the tune table data is stored within the actual class rather than elsewhere. This causes a major tune table flaw for classes that are mapped over 2 or more namespaces as the tuning needs for one namespace could and often is completely different for the tuning needs of the other namespace.
Are you aware of any ways to get around this problem please?
go to post
Hi,
It would seem that your REGINUS database expansion size has been set to 1000, this can be checked via the SMP using System->Configuration->Local Databases and clicking on the relevant database link.
I would hazard a guess that your cachetemp database has an expansion size of 0 which is the system default hence why it is growing at a lesser rate.
If you run ^%GSIZE in the relevant namespaces then you will be able to see which globals are taking up so much space.
There is of course the possibility that you had work objects/globals being created that have since been deleted and therefore you could have a lot of empty space in your database. This can be resolved using both Database Compact and Truncate. These options can be found in the SMP under System->Databases and clicking on the relevant database link.
go to post
I personally would dismount and then take a duplicate copy of the relevant IRIS.dat or Cache.dat at an OS level, then mount them both as separate databases.
I would then delete the globals from 1 and then the the routines/classes from the other.
Then remove any inapropriate namespace mappings if necessary.
go to post
Hi Yone,
I would personally go for something like this:-
if $zd($system.SQL.DATEADD("yy",65,
nacimientoFormateado
),3)<+$h write "younger than 65"if $zd($system.SQL.DATEADD("yy",65,
nacimientoFormateado
),3)>=+$h write "65 or older"Assuming that
nacimientoFormateado
is in an ODBC format i.e. 2021-06-22Hope that helps.
go to post
Not sure if any of the replies are resolving your issue yet but a long winded but definite way of achieving your goal would be to load the data values into a incrementing global i.e. set ^SQLWK($i(SQLWKvariable))=SQL values. You can then run down the global instead of your query result set.
go to post
Hi Saurav,
Thanks for your very detailed response. Coudl I just confirm that you applied this enhancement to your Cache80.conf file please?
go to post
Thanks Vic and Eric,
I think I will call support tomorrow if I cant work out Dmitriy's solution.
go to post
Hi Dmitriy,
Thanks for this link and the work that you have performed on it. Are there any installation instructions that go with this code and set of commands as I'm confused as to what order to add/process each file and on which server to apply which files.
Apologies if I'm missing something here.
go to post
Hi Evgeny,
I agree. We use a UnitTest package for everything UnitTesty. We keep all of the UnitTest classes in a UnitTest namespace/database and map them to our live namespaces.
go to post
Thanks Eduard but this is not it either :-(
go to post
Hi Dimitriy,
No this was definitely software that could be used to audit data changes when class objects were created and amended (and deleted possibly).
From memory it required a pkg.Log class in order to work properly, but I may be wrong.
Steve
go to post
Hi Gaolai,
You need to type :-
write "Hello there!"
rather than :-
"Hello there!"
Godo luck
Steve
go to post
I'm not too sure about accessing different namespaces via SQL but you can use a variety of %ResultSet objects but personally I prefer using an SQL cursor with SQL open, fetch to iterate through the object.
My 'personal' reasons for preferring SQL cursors is that they are extremely fast to develop but more importantly if you add/remove indices in the target class then the class that uses the cursor will use the best available indices without requiring re-compilation unlike at least some of the %ResultSet methods.
jim
go to post
Thank you ever so much for all of your replies. They are really helpful.
I have been given so many useful tips that Ive solved the problem now.
Thank you.
Jim
go to post
Hi, my apologies. I should have mentioned that we are using Cache 2012.1 for Linux.
go to post
window.setTimeout('document.getElementById("loginform").submit()',10);
go to post
In that keep as is and get your login page to redirect to your home page upon successful login.
Jim