how to create logic cluster that contains the past month record?

17 views
Skip to first unread message

Python Rudy

unread,
Nov 19, 2014, 3:24:18 AM11/19/14
to orient-...@googlegroups.com
Hi,
I want to use orientdb to create logic cluster that contains the past month record
it will improve the performance, if I direct query that cluster.
How to do it?
Thanks

Luca Garulli

unread,
Nov 19, 2014, 5:47:12 AM11/19/14
to orient-database
Hi Rudy,
Just att a cluster to your logical entity, the class. Example for class "Log":

CREATE CLUSTER Log_201410
ALTER CLASS Log ADDCLUSTER Log_201410

When you save a record from Java API use:

document.save( "Log_201410" );

or via SQL with:

INSERT INTO Log CLUSTER Log_201410 VALUES ...

Lvc@




--

---
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