Traverse skip and limit are not working

36 views
Skip to first unread message

Pugazharasan Thirumalai

unread,
Jun 8, 2017, 7:17:42 AM6/8/17
to OrientDB
Hai,

We are using  OrientDB version : 2.0.18,

When i execute below the query,

select from (traverse out('package_has_service') from (select expand(out('store_has_package')[is_deleted = false]) from #48:1635))

Am getting the result as,

METADATAPROPERTIESINOUT
@rid
@class
@version
name
cost_price
special_price
tax
validity_count
validity_type
validity_days
discount
is_deleted
is_status
created_date
quantity
service_id
unit_price
commission_profile_has_package
store_has_package
generated_package_has_master_package
package_has_service
package_has_service
#427:59package_master107Package 1047503000#334:2711111136.842falsetrue2016-12-22 15:33:12
#430:860package_services3850536.84336.842false2017-03-28 11:12:291#300:7986850
#430:861package_services3750473.68536.842false2017-03-28 11:12:291#300:7984750
#430:862package_services315094.73736.842false2017-03-28 11:12:291#300:7968150
#430:863package_services31400884.21236.842false2017-03-28 11:12:292#300:9709700
#430:864package_services316001010.52836.842false2017-03-28 11:12:292#300:9710800
#427:155package_master7Test Package60005000#334:269100110016.667falsetrue2017-05-14 10:44:13
#430:946package_services330002499.9916.667false2017-05-14 10:44:132#300:96951500
#430:947package_services330002499.9916.667false2017-05-14 10:44:132#300:96961500
#427:156package_master5Package_test35003000#334:269100110014.286falsetrue2017-05-14 10:46:04



I want to use skip and limit for class "package_master", so i execute the query like,

select from (traverse out('package_has_service') from (select expand(out('store_has_package')[is_deleted = false]) from #48:1635) skip 0 limit 1)

but its not working same result is displaying.

How to apply skip and limit on "package_master" class?

Ivan Mainetti

unread,
Jun 8, 2017, 8:01:55 AM6/8/17
to OrientDB
try 
select from (traverse out('package_has_service') from (select expand(out('store_has_package')[is_deleted = false]) from #48:1635)) skip 0 limit 1

Ivan Mainetti

unread,
Jun 8, 2017, 8:03:03 AM6/8/17
to OrientDB
why are you using such an old version?!
 
 

Pugazharasan Thirumalai

unread,
Jun 8, 2017, 8:25:58 AM6/8/17
to OrientDB
If i run the below code

select from (traverse out('package_has_service') from (select expand(out('store_has_package')[is_deleted = false]) from #48:1635)) skip 0 limit 1

Am getting result as,

METADATAPROPERTIESINOUT
@rid
@class
@version
name
cost_price
special_price
tax
validity_count
validity_type
validity_days
discount
is_deleted
is_status
created_date
generated_package_has_master_package
store_has_package
commission_profile_has_package
package_has_service
#427:59package_master107Package 1047503000#334:2711111136.842falsetrue2016-12-22 15:33:12

Pugazharasan Thirumalai

unread,
Jun 8, 2017, 8:27:25 AM6/8/17
to OrientDB
Actually we planned to migrate to newer version but we have to change query on many places based on newer version, that's why we are using the same version.

Ivan Mainetti

unread,
Jun 8, 2017, 8:39:42 AM6/8/17
to orient-...@googlegroups.com
ok, could you better explain your DB structure (edges, vertices, connection between them) , or at least the part involved in this query?
thank you

Ivan


Pugazharasan Thirumalai

unread,
Jun 8, 2017, 8:55:55 AM6/8/17
to OrientDB
Hai,

Vertex - package_master
Edge - package_has_service
Vertex -package_services

package_has_service edge between package_master and package_services

Each package has multiple services,

So i want package with list of services

for example,

Ivan Mainetti

unread,
Jun 8, 2017, 9:11:38 AM6/8/17
to OrientDB
So, I suppose that select expand(out('store_has_package')[is_deleted = false]) from #48:1635 returns a list of package_master, right?
In this case I think you can limit them like 

select from (traverse out('package_has_service') from (select from (select expand(out('store_has_package')[is_deleted = false]) from #48:1635skip 0 limit 1))

Pugazharasan Thirumalai

unread,
Jun 8, 2017, 9:17:46 AM6/8/17
to OrientDB
Hai Ivan Mainetti ,

Thank you so much....

Its working,

And we are facing performance issue when customer is increase, so many customers disappointment on our product.
So can i get your skype id to contact you.


Thanks and Regards,
T.Pugazharasan.


s.l...@orientdb.com

unread,
Jun 9, 2017, 5:30:16 AM6/9/17
to OrientDB
Hi Pugazharasan Thirumalai,

This is a community mailing list, you can't expect that type of support.

OrientDB LTD, the company behind the OrientDB suite of products, does provide different support subscriptions: http://orientdb.com/support/ and a consultancy service: http://orientdb.com/consulting/

Please consider to become a customer of us. We will help you upgrading to a newer (supported) version and changing / optimizing the queries you are using to get better performance


Thanks,
Reply all
Reply to author
Forward
0 new messages