Limit Skip Query Issue

52 views
Skip to first unread message

Ruituraj Gandhi (Knowledge Explosion)

unread,
Sep 25, 2016, 11:25:32 AM9/25/16
to orient-...@googlegroups.com
Hi,

Trying to understand the unexpected behavior with following query - 

select mid, path, sz, created FROM (select * from Media ORDER BY created DESC LIMIT 20 SKIP 1)

Scenario:
I’ve 5 records in the db. This query ‘select * from Media ORDER BY created DESC LIMIT 20 SKIP 1’ skips first record and returns 4 records, which I intend to do.

But when I combine it like this ‘select mid, path, created FROM (select * from Media ORDER BY created DESC LIMIT 20 SKIP 1)’ it doesn’t skip the records. I would expect it to get details for only filtered results (4 records) but returns details for 5. Is it a bug or something wrong with the query. The above query is simple version of the complex query. 

Please can someone comment on it?

OS - Mac
Orientdb - 2.2.6


~Ruitu

Oleksandr Gubchenko

unread,
Sep 26, 2016, 12:25:50 AM9/26/16
to OrientDB, ruit...@knowledgeexplosion.info
Post your full complex query.

alessand...@gmail.com

unread,
Sep 26, 2016, 9:06:51 AM9/26/16
to OrientDB, ruit...@knowledgeexplosion.info
Hi, 
I have tested it on version 2.2.6 and it works.

Example






Could you post your complex query to try to reproduce the problem ?

Thanks,
Alessandro

alessand...@gmail.com

unread,
Sep 26, 2016, 9:20:01 AM9/26/16
to OrientDB, ruit...@knowledgeexplosion.info
Hi,
the problem occurs with the order by.

Could you open an issue on github ?

Thanks,
Alessandro

Ruituraj Gandhi (Knowledge Explosion)

unread,
Sep 27, 2016, 4:57:31 AM9/27/16
to orient-...@googlegroups.com
Thanks guys; happening because of order by & Limit-skip interaction.

Here is the issue - 

What is the approximate timeline for fix?

~Ruitu



--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages