[
https://issues.jboss.org/browse/TEIID-5846?page=com.atlassian.jira.plugin...
]
Renat Eskenin commented on TEIID-5846:
--------------------------------------
DDL
{code}
CREATE DATABASE db;
USE DATABASE db;
CREATE FOREIGN DATA WRAPPER salesforce;
CREATE FOREIGN DATA WRAPPER mysalesforce type salesforce OPTIONS (supportsOrderBy false);
CREATE SERVER salesforce FOREIGN DATA WRAPPER mysalesforce OPTIONS
("resource-name" 'salesforce');
CREATE SCHEMA sf SERVER salesforce;
IMPORT FROM SERVER salesforce INTO sf OPTIONS("importer.useFullSchemaName"
'false');
{code}
LOG
{code}
[2019-11-15 18:38:43,539 MSK] DEBUG
[salesforce-odata-facade,a0a7588791d15c18,a0a7588791d15c18,false] org.teiid.PROCESSOR
[http-nio-8080-exec-1]: Request Thread 8yNyEoQ+lwBm.0
with state NEW
[2019-11-15 18:38:43,539 MSK] DEBUG
[salesforce-odata-facade,a0a7588791d15c18,a0a7588791d15c18,false] org.teiid.PROCESSOR
[http-nio-8080-exec-1]: 8yNyEoQ+lwBm.0 executing
prepared /*+ cache(ttl:300000 scope:USER) */ SELECT g0.Id, g0.FiscalYearSettingsId,
g0.Type, g0.StartDate, g0.EndDate, g0.IsForecastPeriod, g0.QuarterLabel, g0.PeriodLabel,
g0.Number, g0.FullyQualifiedLabel FROM sf.Period AS g0 ORDER BY g0.Id LIMIT ?, ? /*
8yNyEoQ+lwBm */
[2019-11-15 18:38:43,544 MSK] DEBUG
[salesforce-odata-facade,a0a7588791d15c18,a0a7588791d15c18,false] org.teiid.PROCESSOR
[http-nio-8080-exec-1]: ProcessTree for 8yNyEoQ+lwBm.0
LimitNode(0) output=[g0.Id, g0.FiscalYearSettingsId, g0.Type, g0.StartDate, g0.EndDate,
g0.IsForecastPeriod, g0.QuarterLabel, g0.PeriodLabel, g0.Number, g0.FullyQualifiedLabel]
limit ? offset ?
SortNode(1) output=[g0.Id, g0.FiscalYearSettingsId, g0.Type, g0.StartDate, g0.EndDate,
g0.IsForecastPeriod, g0.QuarterLabel, g0.PeriodLabel, g0.Number, g0.FullyQualifiedLabel]
[SORT] [g0.Id]
AccessNode(2) output=[g0.Id, g0.FiscalYearSettingsId, g0.Type, g0.StartDate,
g0.EndDate, g0.IsForecastPeriod, g0.QuarterLabel, g0.PeriodLabel, g0.Number,
g0.FullyQualifiedLabel] SELECT sf.Period.Id, sf.Period.FiscalYearSettingsId,
sf.Period.Type, sf.Period.StartDate, sf.Period.EndDate, sf.Period.IsForecastPeriod,
sf.Period.QuarterLabel, sf.Period.PeriodLabel, sf.Period.Number,
sf.Period.FullyQualifiedLabel FROM sf.Period
[2019-11-15 18:38:43,546 MSK] DEBUG
[salesforce-odata-facade,a0a7588791d15c18,a0a7588791d15c18,false] org.teiid.TXN_LOG
[http-nio-8080-exec-1]: before
getOrCreateTransactionContext:org.teiid.dqp.internal.process.TransactionServerImpl@599d9381(8yNyEoQ+lwBm)
[2019-11-15 18:38:43,547 MSK] DEBUG
[salesforce-odata-facade,a0a7588791d15c18,a0a7588791d15c18,false] org.teiid.TXN_LOG
[http-nio-8080-exec-1]: after
getOrCreateTransactionContext : 8yNyEoQ+lwBm NONE ID:NONE
[2019-11-15 18:38:43,548 MSK] DEBUG
[salesforce-odata-facade,a0a7588791d15c18,a0a7588791d15c18,false] org.teiid.BUFFER_MGR
[http-nio-8080-exec-1]: Creating TupleBuffer: 2
[g0.Id, g0.FiscalYearSettingsId, g0.Type, g0.StartDate, g0.EndDate, g0.IsForecastPeriod,
g0.QuarterLabel, g0.PeriodLabel, g0.Number, g0.FullyQualifiedLabel] [class
java.lang.String, class java.lang.String, class java.lang.String, class java.sql.Date,
class java.sql.Date, class java.lang.Boolean, class java.lang.String, class
java.lang.String, class java.lang.Integer, class java.lang.String] batch size 256 of type
PROCESSOR
[2019-11-15 18:38:43,550 MSK] DEBUG
[salesforce-odata-facade,a0a7588791d15c18,a0a7588791d15c18,false] org.teiid.CONNECTOR
[http-nio-8080-exec-1]: 8yNyEoQ+lwBm.0.2.0 Create
State
[2019-11-15 18:38:43,568 MSK] DEBUG [salesforce-odata-facade,,,] org.teiid.PROCESSOR
[Worker0_QueryProcessorQueue0]: Running task for parent
thread http-nio-8080-exec-1
[2019-11-15 18:38:43,568 MSK] DEBUG [salesforce-odata-facade,,,] org.teiid.CONNECTOR
[Worker0_QueryProcessorQueue0]: 8yNyEoQ+lwBm.0.2.0
Processing NEW request: SELECT sf.Period.Id, sf.Period.FiscalYearSettingsId,
sf.Period.Type, sf.Period.StartDate, sf.Period.EndDate, sf.Period.IsForecastPeriod,
sf.Period.QuarterLabel, sf.Period.PeriodLabel, sf.Period.Number,
sf.Period.FullyQualifiedLabel FROM sf.Period
[2019-11-15 18:38:43,572 MSK] DEBUG
[salesforce-odata-facade,a0a7588791d15c18,a0a7588791d15c18,false] org.teiid.BUFFER_MGR
[http-nio-8080-exec-1]: Creating TupleBuffer: 3
[g0.Id, g0.FiscalYearSettingsId, g0.Type, g0.StartDate, g0.EndDate, g0.IsForecastPeriod,
g0.QuarterLabel, g0.PeriodLabel, g0.Number, g0.FullyQualifiedLabel] [class
java.lang.String, class java.lang.String, class java.lang.String, class java.sql.Date,
class java.sql.Date, class java.lang.Boolean, class java.lang.String, class
java.lang.String, class java.lang.Integer, class java.lang.String] batch size 256 of type
PROCESSOR
[2019-11-15 18:38:43,572 MSK] DEBUG
[salesforce-odata-facade,a0a7588791d15c18,a0a7588791d15c18,false] org.teiid.PROCESSOR
[http-nio-8080-exec-1]: Created intermediate sort
buffer 3
[2019-11-15 18:38:43,572 MSK] DEBUG
[salesforce-odata-facade,a0a7588791d15c18,a0a7588791d15c18,false] org.teiid.BUFFER_MGR
[http-nio-8080-exec-1]: 8yNyEoQ+lwBm.0.2.0 Blocking on
source query 8yNyEoQ+lwBm.0.2.0
[2019-11-15 18:38:43,572 MSK] DEBUG
[salesforce-odata-facade,a0a7588791d15c18,a0a7588791d15c18,false] org.teiid.BUFFER_MGR
[http-nio-8080-exec-1]: 8yNyEoQ+lwBm.0 Blocking on
source request(s).
[2019-11-15 18:38:43,572 MSK] DEBUG
[salesforce-odata-facade,a0a7588791d15c18,a0a7588791d15c18,false] org.teiid.PROCESSOR
[http-nio-8080-exec-1]: Request Thread 8yNyEoQ+lwBm.0
- processor blocked
[2019-11-15 18:38:43,765 MSK] DEBUG [salesforce-odata-facade,,,] org.teiid.CONNECTOR
[Worker0_QueryProcessorQueue0]: 8yNyEoQ+lwBm.0.2.0
Obtained execution
[2019-11-15 18:38:43,765 MSK] DEBUG [salesforce-odata-facade,,,]
org.teiid.COMMAND_LOG.SOURCE
[Worker0_QueryProcessorQueue0]: START DATA SRC COMMAND: startTime=2019-11-15
18:38:43.765 requestID=8yNyEoQ+lwBm.0 sourceCommandID=2 executionID=0 txID=null modelName=sf translatorName=mysalesforce sessionID=8yNyEoQ+lwBm principal=sf sql=SELECT
sf.Period.Id, sf.Period.FiscalYearSettingsId, sf.Period.Type, sf.Period.StartDate,
sf.Period.EndDate, sf.Period.IsForecastPeriod, sf.Period.QuarterLabel,
sf.Period.PeriodLabel, sf.Period.Number, sf.Period.FullyQualifiedLabel FROM sf.Period
[2019-11-15 18:38:43,779 MSK] DEBUG [salesforce-odata-facade,,,] org.teiid.CONNECTOR
[Worker0_QueryProcessorQueue0]:
salesforce.8yNyEoQ+lwBm.8yNyEoQ+lwBm.0.2: Incoming Query: SELECT Period.Id,
Period.FiscalYearSettingsId, Period.Type, Period.StartDate, Period.EndDate,
Period.IsForecastPeriod, Period.QuarterLabel, Period.PeriodLabel, Period.Number,
Period.FullyQualifiedLabel FROM Period
[2019-11-15 18:38:43,788 MSK] DEBUG [salesforce-odata-facade,,,] org.teiid.CONNECTOR
[Worker0_QueryProcessorQueue0]:
salesforce.8yNyEoQ+lwBm.8yNyEoQ+lwBm.0.2: Executing Query: SELECT Period.Id,
Period.FiscalYearSettingsId, Period.Type, Period.StartDate, Period.EndDate,
Period.IsForecastPeriod, Period.QuarterLabel, Period.PeriodLabel, Period.Number,
Period.FullyQualifiedLabel FROM Period
{code}
top in odata query is not working
---------------------------------
Key: TEIID-5846
URL:
https://issues.jboss.org/browse/TEIID-5846
Project: Teiid
Issue Type: Bug
Components: OData, Salesforce Connector
Environment: teiid-spring-boot+spring-odata teiid+spring-data-salesforce
Reporter: Renat Eskenin
Priority: Major
Fix For: 13.1
When we call simple request as
salesforce-odata-facade/odata/salesforce/Product_License__c?$top=1&$select=Id
request processing time is 1min. But this request processing by simple SOAP SOQL request
is ~150ms.
I think this do because teiid select all objects by ignoring top in request.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)