[
https://issues.redhat.com/browse/TEIID-5963?page=com.atlassian.jira.plugi...
]
Renat Eskenin updated TEIID-5963:
---------------------------------
Steps to Reproduce:
We have teiid spring boot app with jdbc connection.
DDL file
{code:sql}
CREATE DATABASE db;
USE DATABASE db;
--use translator
CREATE FOREIGN DATA WRAPPER postgresql;
--CREATE FOREIGN DATA WRAPPER mypostgresql type postgresql OPTIONS (supportsOrderBy
true);
--create teiid server
CREATE SERVER pgserver FOREIGN DATA WRAPPER postgresql OPTIONS (supportsOrderBy true);
-- create source schema
CREATE SCHEMA schpostgresql SERVER pgserver;
-- schema manual_loads
IMPORT FOREIGN SCHEMA manual_loads FROM SERVER pgserver INTO schpostgresql
OPTIONS("importer.useFullSchemaName" 'false',
"importer.tableTypes" 'TABLE,VIEW');
{code}
Properties
{code}
spring.datasource.platform=pgserver
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.jdbcUrl=jdbc:postgresql://test.com:5432/dwh?SearchPath=manual_loads,currentSchema=manual_loads
spring.datasource.password=
spring.datasource.username=
spring.jpa.properties.hibernate.default_schema=manual_loads
spring.datasource.hikari.schema=manual_loads
hibernate.temp.use_jdbc_metadata_defaults=false
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false
logging.level.org=TRACE
spring.jpa.hibernate.ddl-auto=none
spring.main.allow-bean-definition-overriding=true
spring.main.banner-mode=off
spring.profiles.active=dev
teiid.vdb-file=dwh.ddl
{code}
In logs we saw that Teeiid load all metadata from DB not only concrete schema
{code}
FE=> Sync
<=BE BindComplete [unnamed]
<=BE DataRow(len=2)
<=BE CommandStatus(SELECT 1)
<=BE ReadyForQuery(I)
simple execute, handler=org.postgresql.jdbc.PgStatement$StatementResultHandler@8301268,
maxRows=0, fetchSize=0, flags=16
FE=> Bind(stmt=S_1,portal=null,$1=<'_xuotedocument'>,type=VARCHAR)
FE=> Execute(portal=null,limit=0)
FE=> Sync
<=BE BindComplete [unnamed]
<=BE DataRow(len=2)
<=BE CommandStatus(SELECT 1)
<=BE ReadyForQuery(I)
simple execute,
handler=org.postgresql.jdbc.PgStatement$StatementResultHandler@3bbb53f6, maxRows=0,
fetchSize=0, flags=16
FE=> Bind(stmt=S_1,portal=null,$1=<'_xuotelineitem'>,type=VARCHAR)
FE=> Execute(portal=null,limit=0)
FE=> Sync
<=BE BindComplete [unnamed]
<=BE DataRow(len=2)
<=BE CommandStatus(SELECT 1)
<=BE ReadyForQuery(I)
{code}
And we used
{code:xml}
<dependency>
<groupId>org.teiid</groupId>
<artifactId>teiid-spring-boot-starter</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>org.teiid</groupId>
<artifactId>spring-odata</artifactId>
<version>1.5.0</version>
</dependency>
{code}
So, we have loooong start time of app :)
was:
We have teiid spring boot app with jdbc connection.
DDL file
{code:sql}
CREATE DATABASE db;
USE DATABASE db;
--use translator
CREATE FOREIGN DATA WRAPPER postgresql;
--CREATE FOREIGN DATA WRAPPER mypostgresql type postgresql OPTIONS (supportsOrderBy
true);
--create teiid server
CREATE SERVER pgserver FOREIGN DATA WRAPPER postgresql OPTIONS (supportsOrderBy true);
-- create source schema
CREATE SCHEMA schpostgresql SERVER pgserver;
-- schema manual_loads
IMPORT FOREIGN SCHEMA manual_loads FROM SERVER pgserver INTO schpostgresql
OPTIONS("importer.useFullSchemaName" 'false',
"importer.tableTypes" 'TABLE,VIEW');
{code}
Properties
{code}
spring.datasource.platform=pgserver
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.jdbcUrl=jdbc:postgresql://test.com:5432/dwh?SearchPath=manual_loads,currentSchema=manual_loads
spring.datasource.password=
spring.datasource.username=
spring.jpa.properties.hibernate.default_schema=manual_loads
spring.datasource.hikari.schema=manual_loads
hibernate.temp.use_jdbc_metadata_defaults=false
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false
logging.level.org=TRACE
spring.jpa.hibernate.ddl-auto=none
spring.main.allow-bean-definition-overriding=true
spring.main.banner-mode=off
spring.profiles.active=dev
teiid.vdb-file=dwh.ddl
{code}
In logs we saw that Teeiid load all metadata from DB not only concrete schema
{code}
FE=> Sync
<=BE BindComplete [unnamed]
<=BE DataRow(len=2)
<=BE CommandStatus(SELECT 1)
<=BE ReadyForQuery(I)
simple execute, handler=org.postgresql.jdbc.PgStatement$StatementResultHandler@8301268,
maxRows=0, fetchSize=0, flags=16
FE=> Bind(stmt=S_1,portal=null,$1=<'_xuotedocument'>,type=VARCHAR)
FE=> Execute(portal=null,limit=0)
FE=> Sync
<=BE BindComplete [unnamed]
<=BE DataRow(len=2)
<=BE CommandStatus(SELECT 1)
<=BE ReadyForQuery(I)
simple execute,
handler=org.postgresql.jdbc.PgStatement$StatementResultHandler@3bbb53f6, maxRows=0,
fetchSize=0, flags=16
FE=> Bind(stmt=S_1,portal=null,$1=<'_xuotelineitem'>,type=VARCHAR)
FE=> Execute(portal=null,limit=0)
FE=> Sync
<=BE BindComplete [unnamed]
<=BE DataRow(len=2)
<=BE CommandStatus(SELECT 1)
<=BE ReadyForQuery(I)
{code}
So, we have loooong start time of app :)
Teiid imported all schemas from PG
----------------------------------
Key: TEIID-5963
URL:
https://issues.redhat.com/browse/TEIID-5963
Project: Teiid
Issue Type: Bug
Components: JDBC Connector
Affects Versions: 14.0
Reporter: Renat Eskenin
Assignee: Steven Hawkins
Priority: Major
When we started teiid spring boot app, we have long start time.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)