Board index » delphi » SQL sent from D2.01 to Oracle via SQL*Net D2.01

SQL sent from D2.01 to Oracle via SQL*Net D2.01

Quote
Relational Technology International wrote:

> Hi

> I have noticed that when I create a parameterised TQuery object which
> returns data from Oracle 7.2 via SQL*Net, the SQL Monitor shows me that
> even if the query selected 3 columns from a possible 20 in the table,
> the SQL statement sent to the server is rebuilt and selects all columns
> in the table. I only have 3 data aware fields on the form and so only
> see the 3 cols. requested, but this seems to me to create an unnecessary
> amount of network traffic - this will be of concern when we go into
> production.

> Why does this happen and how can I avoid it?

> When I build the same TQuery using ODBC, the SQL Monitor shows that the
> proper statement is being executed, selecting only the columns I
> specified. That's the behaviour I expect from SQL*Net.

> TIA
> Lisa Ward
> l...@rti.co.nz

Lisa,

What is the SQL statement in the TQuery.SQL property?

Mike

 

Re:SQL sent from D2.01 to Oracle via SQL*Net D2.01


Hi

I have noticed that when I create a parameterised TQuery object which
returns data from Oracle 7.2 via SQL*Net, the SQL Monitor shows me that
even if the query selected 3 columns from a possible 20 in the table,
the SQL statement sent to the server is rebuilt and selects all columns
in the table. I only have 3 data aware fields on the form and so only
see the 3 cols. requested, but this seems to me to create an unnecessary
amount of network traffic - this will be of concern when we go into
production.

Why does this happen and how can I avoid it?

When I build the same TQuery using ODBC, the SQL Monitor shows that the
proper statement is being executed, selecting only the columns I
specified. That's the behaviour I expect from SQL*Net.

TIA
Lisa Ward
l...@rti.co.nz

Re:SQL sent from D2.01 to Oracle via SQL*Net D2.01


Quote
Relational Technology International wrote:

> Hi

> I have noticed that when I create a parameterised TQuery object which
> returns data from Oracle 7.2 via SQL*Net, the SQL Monitor shows me that
> even if the query selected 3 columns from a possible 20 in the table,
> the SQL statement sent to the server is rebuilt and selects all columns
> in the table. I only have 3 data aware fields on the form and so only
> see the 3 cols. requested, but this seems to me to create an unnecessary
> amount of network traffic - this will be of concern when we go into
> production.

> Why does this happen and how can I avoid it?

> When I build the same TQuery using ODBC, the SQL Monitor shows that the
> proper statement is being executed, selecting only the columns I
> specified. That's the behaviour I expect from SQL*Net.

> TIA
> Lisa Ward
> l...@rti.co.nz

Sounds like the property RequestLive = True in your TQuery component.
Make this False and your problem should go away.

Vijay

Other Threads