JDBC in Teiid

Driver Connection

Teiid JDBC Driver Class is org.teiid.jdbc.TeiidDriver, use the following URL format for JDBC connections:


FetchSize Connection Properties

Teiid Support a series of Properties, refer to Teiid Document for details.

FetchSize hints the size of the resultset, the default is 2048, which means, the resultset size is 2048. In this section, we will dive into details how FetchSize setting works in Teiid.

  1. In How a connection be created step, a org.teiid.jdbc.ConnectionImpl be created, Property FetchSize be set a to connectionProerties list.
  2. In How a Statement execute the query setp, org.teiid.jdbc.StatementImpl FetchSize be extract from connectionProerties, parse to a integer, set to StatementImpl’s fetchSize filed, which this occurr in StatementImpl’s construct, then the FetchSize be sent to org.teiid.client.RequestMessage.
  3. In How Teiid Server handle query request, Parse Message get the org.teiid.client.RequestMessage, invoke the DQPCore’s executeRequest(), FetchSize in RequestMessage be passed as a parameter.
  4. In DQPCore’s executeRequest(), RequestMessage be sent to Request then be sent to RequestWorkItem, and base on FetchSize RequestWorkItem’s begin and end be updated.