New
Question Tom Scaletti · 20 hr ago

I need to analyse and improve the performance on some old SQL statements.

One statement uses NVL in the WHERE clause (no wonder why it's slow) but I still have to improve the performance and the data really needs to be the same when returned.

SELECT *
FROM TOURHead, TOURFIND, SGNRFIND, TNRHead
WHERE TOURHead.cl = '123'
AND TOURHead.cl = TOURFIND.cl
AND TOURHead.TOURNR = TOURFIND.TOURNR
AND TOURFIND.cl =* SGNRFIND.cl
AND TOURFIND.SGNR    =* SGNRFIND.SGNR
AND TOURFIND.cl = TNRHead.cl
AND NVL(TOURFIND.TNR, SGNRFIND.TNR) = TNRHead.TNR;

Really hope someone can help me with this one.

3
0 44
Question Tom Scaletti · Apr 21

I am connecting to an intersystems cache database via C# and I need to obtain a list of all available namespaces.

I am using code like this:

// Source - https://stackoverflow.com/q/79393836
// Posted by Tony Valenti, modified by community. See post 'Timeline' for change history
// Retrieved 2026-04-21, License - CC BY-SA 4.0
namespace ConsoleApp13
{
   internal class Program
   {
       static void Main(string[] args)
       {
           var CS = "Server=XXXXX;User=system;Password=sys;";
           
           var C = new InterSystems.Data.CacheClient.CacheConnection(CS);
           C.Open();
           var Command = C.CreateCommand();
           Command.CommandText = $@"
               select * from %SYS.Namespace_List()
           ";
           var Values = Command.ExecuteReader();
           while (Values.Read()) {
           }
       }
   }
}
4
1 73