Max records possible bug on Advanced Queries

Max records possible bug on Advanced Queries

  
Hi,

I think I've found a bug on the platform regarding to the max records property on advanced queries, at least when using the platform with an Oracle Database. 

I've done a simple test, creating a user action with an advanced query and a simple query both with the max records property set.

After executing the action I checked the  executed SQL by querying de view V$SQL:  for the simple query, everything was as expected, the executed SQL had an ROWNUM with the value of the max records; but for the advanced query, the executed SQL was exactly the same as defined in the service studio, with no ROWNUM property.

Anyone had the same issue?

I'm using platform version 8.0.1.12, with stack .Net and Oracle 11g 
Hi Bruno,

The Advanced Query text is never modified (apart from replacing the {Entities} and expand inline @parameters).
So, yes the Max Records in an Advanced Query never results in a TOP / ROWNUM operation being added to the query. It just means that the reader/cursor returned by the query will never be iterated more times than the Max Records.

If you want to improve performance on advanced queries, you should add it as a query input manually.

Regards,
João Rosado
Hi João,

First of all, thanks for your explanation.

But don't you think this fact should be more clear? Until now I always thought that by defining the max records attribute I was limiting the number of records on my query, not on the list returned by the query. 
Yes, I agree that it should be more explicit on the description, expecially since it has a different behavior than on Simple Queries (where it does what you expected).

Regards,
João Rosado
João Rosado wrote:
Hi Bruno,

The Advanced Query text is never modified (apart from replacing the {Entities} and expand inline @parameters).
So, yes the Max Records in an Advanced Query never results in a TOP / ROWNUM operation being added to the query. It just means that the reader/cursor returned by the query will never be iterated more times than the Max Records.

If you want to improve performance on advanced queries, you should add it as a query input manually.

Regards,
João Rosado
 
 Hi Joao, can this info be put in the documentation? It would help.

Joel