Retrieving long data
- Last Updated: October 7, 2020
- 1 minute read
- DataDirect Connectors
- ODBC
- Aha! 8.0
- Amazon Redshift 8.0
- Apache Cassandra 8.0
- Apache Hive 8.0
- Apache Spark SQL 8.0
- Autonomous Rest Connector 8.0
- Cloudera Impala 7.1
- dBase 7.1
- + 24
Because retrieving long data across the network is slow and resource-intensive, applications should not request long data (SQL_LONGVARCHAR, SQL_WLONGVARCHAR, and SQL_LONGVARBINARY data) unless it is necessary.
Most users do not want to see long data. If the user does need to see these result items, the application can query the database again, specifying only long columns in the select list. This technique allows the average user to retrieve the result set without having to pay a high performance penalty for network traffic.
Although the best approach is to exclude long data from the select
list, some applications do not formulate the select list before
sending the query to the ODBC driver (that is, some applications
simply SELECT * FROM table_name ...).
If the select list contains long data, the driver must retrieve
that data at fetch time even if the application does not bind the
long data in the result set. When possible, use a technique that
does not retrieve all columns of the table.