Quoting doc: "Name indirection, argument indirection, and XECUTE commands that appear within a procedure are not executed within the scope of the procedure."

https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...

Consider method:

Class Test.test [ Abstract ]
{

ClassMethod ind()
{
    kill info

    set active = 1
    set i="active"
    set @i = "global scope"
    break
}

}

Output:

USER>do ##class(Test.test).ind()

 break }
 ^
<BREAK>zind+5^Test.test.1
USER 2d1>w

active="global scope"
<Private variables>
active=1
i="active"

Notice private variables and public variables.

I'm getting following error, running your program on Caché 2017.2.2:

USER>do ^test
This FTP server is anonymous only.

And it works OK once I change Connect to be anonymous:

If 'ftp.Connect(host,"anonymous","",port) Write ftp.ReturnMessage,! Quit sc

Output:

USER>do ^test
Ftp server messsage:
Features:
 EPRT
 EPSV
 MDTM
 PASV
 REST STREAM
 SIZE
 TVFS
End
Mode now: Binary
Length of file received: 524288

Can you connect to speedtest.tele2.net from the same server, but not from Caché? Maybe access via port 21 is blocked by your firewall?

I think I would run tests and publish the results.

I think this test proves nothing.

Interesting to know underlying reasoning of saying: "Use bitmap index if there are less than X distinct values in common" or "Use bitmap index if selectivity of column is less than Y".

Why X, why Y? Where is this 6400 and 2% come from? What is it in bitmap indices that makes them slower, once these thresholds are reached?

There are two many variables to take into account in this test, so it's much more interesting to see formula than test results.

a) I think no, performance will not improve if you have nine SQLGateways.

SQLGateway ODBC connection is established in each process.

So each separate Caché process has each own connection to the SQLServer.

b) As to the SQLGateway performance. I think first thing you need to check is how SQLServer itself handles these nine queries being run simultaneusly. If it's fast, and slow only via SQLGateway connection, then it makes sense to look into if something can be configured on SQLGateway / Caché side.