[teiid-issues] [JBoss JIRA] (TEIID-5846) top in odata query is not working
Renat Eskenin (Jira)
issues at jboss.org
Fri Nov 15 03:13:00 EST 2019
[ https://issues.jboss.org/browse/TEIID-5846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13813447#comment-13813447 ]
Renat Eskenin commented on TEIID-5846:
--------------------------------------
Ok, i did try to use vdb
{code:sql}
CREATE DATABASE db;
USE DATABASE db;
CREATE FOREIGN DATA WRAPPER salesforce;
CREATE SERVER salesforce FOREIGN DATA WRAPPER salesforce OPTIONS ("resource-name" 'salesforce', supportsOrderBy true);
CREATE SCHEMA sf SERVER salesforce;
IMPORT FROM SERVER salesforce INTO sf OPTIONS("importer.useFullSchemaName" 'false');
{code}
odata request is: http://localhost:8080/odata/sf/Period?%24top=1
Debug Logs from ODATA
{code}
[2019-11-15 11:02:11,902 MSK] DEBUG [salesforce-odata-facade,458605527be75221,458605527be75221,false] org.teiid.ODATA [http-nio-8080-exec-2]: Teiid-Query: /*+ 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 ?, ? /* eqIITzWcC3iJ */
{code}
Debug Logs from PROCESSOR
{code}
[2019-11-15 11:02:11,903 MSK] DEBUG [salesforce-odata-facade,458605527be75221,458605527be75221,false] org.teiid.PROCESSOR [http-nio-8080-exec-2]: eqIITzWcC3iJ.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 ?, ? /* eqIITzWcC3iJ */
{code}
Debug Logs from CONNECTOR without LIMIT
{code}
[2019-11-15 11:02:11,935 MSK] DEBUG [salesforce-odata-facade,,,] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue0]: eqIITzWcC3iJ.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
{code}
What wrong in my example?
> 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)
More information about the teiid-issues
mailing list