I noticed that core.py has these few lines:
if statement.find('select') == 0 or statement.find('SELECT') == 0 :
statement = statement + " ANALYZE"
self.execute(cursor, statement, None)
Which results in:
2022-10-20 13:26:00 CDT | INFO | sqlalchemy.engine.base.Engine._execute_context | select objid from _v_table where objid > 200000 and tablename = ? and schema = ?
2022-10-20 13:26:00 CDT | INFO | sqlalchemy.engine.base.Engine._execute_context | ('JAMIE_TEST', 'ADMIN')
2022-10-20 13:26:00 CDT | DEBUG | nzpy.Connection[<DB>].execute | Buffer sent to nps:bytearray(b'P\x00\x00\x00\nselect objid from _v_table where objid > 200000 and tablename = NULL and schema = NULL ANALYZE\x00')
2022-10-20 13:26:00 CDT | DEBUG | nzpy.Connection[<DB>].connNextResultSet | Backend response: b'E'
2022-10-20 13:26:00 CDT | DEBUG | nzpy.Connection[<DB>].connNextResultSet | Response received from backend:ERROR: ANALYZE is supported only with ODBC, JDBC, OLE-DB Prepared Statements
Like, lol why? What's the purpose of throwing analyze in there? Why is the Connection.Prepare() method creating this statement and executing it only to return a query that is going to be executed? Why isn't there a check to see if it's an ODBC, JDBC, or OLE-DB connection prior to executing? Why is there no override to disable that type of silliness?
It's not like the results of ANALYZE are being parsed so what's the point?
I noticed that
core.pyhas these few lines:Which results in:
Like, lol why? What's the purpose of throwing analyze in there? Why is the
Connection.Prepare()method creating this statement and executing it only to return a query that is going to be executed? Why isn't there a check to see if it's an ODBC, JDBC, or OLE-DB connection prior to executing? Why is there no override to disable that type of silliness?It's not like the results of
ANALYZEare being parsed so what's the point?