Hi, Gurus.
My app use BDE and DOA to access oracle from Delphi 3-tier application.
Most of logical read produce that query:

SELECT username, SUM (DECODE (PRIVILEGE, 'SELECT ANY TABLE', 2, 'CREATE SESSION', 1, 0))
FROM session_privs, user_users
WHERE PRIVILEGE IN ('SELECT ANY TABLE', 'CREATE SESSION')
GROUP BY username

I know: my developers don't write that query.
Who and why can produce it?
How to avoid it? It will better to rewrite it with:

SELECT user as username, SUM (DECODE (PRIVILEGE, 'SELECT ANY TABLE', 2, 'CREATE SESSION', 1, 0))
FROM session_privs
WHERE PRIVILEGE IN ('SELECT ANY TABLE', 'CREATE SESSION')

WBR, Alexander