how can I make index, using group by?

34 views
Skip to first unread message

김제준

unread,
Aug 6, 2015, 2:24:57 AM8/6/15
to OrientDB
Hi!!

My class ActivityLog have two property.
createdAt(datetime)
userNo(long)

and I make index each column.

and my query is 
'SELECT userNo, count(userNo) FROM ActivityLog WHERE createdAt BETWEEN '2015-08-01 00:02:17' AND '2015-08-01 12:02:17' GROUP BY userNo'

orientdb log say 
"Query 'SELECT FROM activityLog WHERE createdAt BETWEEN '2015-08-01 14:29:55' AND '2015-08-02 17:29:55' AND type = 'LO' GROUP BY userNo' fetched more than 50000 records: to speed up the execution, create an index or change the query to use an existent index [OEnterpriseProfiler]"

how can i make index using group by?




Giulia Brignoli

unread,
Aug 6, 2015, 2:59:58 AM8/6/15
to orient-...@googlegroups.com
Hi,

which version are you using? and what kind of indexes you used?

Regards,
Giulia

김제준

unread,
Aug 6, 2015, 3:31:31 AM8/6/15
to OrientDB
2.1.0 and USING NOTUNIQUE index.

I have 3 classes.
1. ActivityLog(abstract)
2. ActivityEtcLog extends Activitylog.
3. ActivityWriteLog extends ActivityLog.

All property and index in ActivityLog.


2015년 8월 6일 목요일 오후 3시 59분 58초 UTC+9, Giulia Brignoli 님의 말:

Giulia Brignoli

unread,
Aug 6, 2015, 3:58:51 AM8/6/15
to OrientDB

I'm sorry, you can attach your database so that you can test?
And what would you come back with your query? Because it isn't very clear.

Regards,
Giulia

Message has been deleted

Giulia Brignoli

unread,
Aug 6, 2015, 5:41:57 AM8/6/15
to OrientDB
HI,

this isn't an exception but a tips, in fact it appears the result of your query

Bye,
Giulia
Reply all
Reply to author
Forward
0 new messages