cancel
Showing results for 
Search instead for 
Did you mean: 

Limit and offset select clauses not working on virtual tables

rakshetha_jn
Associate
Associate
0 Kudos

Hi is this a know issue? , that the limit and offset clauses don't work on select's used on SAP HANA virtual tables

that are created using SAP HANA smart data access.

on executing

select * from test_virtual table limit 15 offset 0


select * from test_virtual table limit 15 offset 16


I get back the same rows.


any suggestions


best regards

Rakshetha

Accepted Solutions (0)

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

Your observation is correct.

I checked this on rev. 92 and found that a statement like

SELECT distinct

"METER_ID"

FROM "LARS"."IMACCESS_METERREADINGS"

order by  meter_id

LIMIT 10 OFFSET 10

is translated to

SELECT

     "IMACCESS_METERREADINGS"."METER_ID"

FROM

     "LARS"."METERREADINGS" "IMACCESS_METERREADINGS"

GROUP BY

     "IMACCESS_METERREADINGS"."METER_ID"

ORDER BY

     "IMACCESS_METERREADINGS"."METER_ID" ASC

LIMIT 10

Which explains why the OFFSET is not obeyed - it never reaches the remote database instance.

I'd propose to open a support ticket for this...

- Lars