Hi Garrett,
Indexes against base class should work, maybe this is a bug. Can you try to
create the very same index against the Post class?

Lvc@



On 25 July 2014 20:31, Garrett Gottlieb <[email protected]> wrote:

> Would it be faster to separate my abstract PumpUp class and create the
> indexes/properties separately for every class? Or perhaps it would be
> faster if the abstract class maintained a separate index for every class?
>
>
> On Friday, July 25, 2014 1:56:31 PM UTC-4, Garrett Gottlieb wrote:
>
>> Hi Luca,
>>
>> I've updated the index:
>>
>> CREATE INDEX PumpUp.updatedAt ON PumpUp (updatedAt) NOTUNIQUE
>>
>>
>> orientdb {pumpup}> info class PumpUp
>>
>>
>> Class................: PumpUp
>> Super class..........: ORestricted
>> Default cluster......: null (id=-1)
>> Supported cluster ids: [-1]
>> Cluster selection....: round-robinBase classes.........: E, V
>>
>>
>>
>>
>> PROPERTIES
>> -------------------------------+-------------+--------------
>> -----------------+-----------+----------+----------+--------
>> ---+-----------+----------+
>>  NAME                          | TYPE        | LINKED TYPE/CLASS
>>     | MANDATORY | READONLY | NOT NULL |    MIN    |    MAX    | COLLATE
>> |
>> -------------------------------+-------------+--------------
>> -----------------+-----------+----------+----------+--------
>> ---+-----------+----------+
>>  replacedACL                   | BOOLEAN     | null
>>      | false     | false    | false    |           |           | default
>>  |
>>  createdAt                     | DATETIME    | null
>>      | false     | false    | false    |           |           | default
>>  |
>>  ACL                           | EMBEDDEDMAP | EMBEDDEDMAP
>>     | false     | false    | false    |           |           | default
>> |
>>  objectId                      | STRING      | null
>>      | false     | false    | false    |           |           | default
>>  |
>>  updatedAt                     | DATETIME    | null
>>      | false     | false    | false    |           |           | default
>>  |
>>  _allowDelete                  | LINKSET     | OIdentity
>>     | false     | false    | false    |           |           | default
>> |
>>  _allowRead                    | LINKSET     | OIdentity
>>     | false     | false    | false    |           |           | default
>> |
>>  _allow                        | LINKSET     | OIdentity
>>     | false     | false    | false    |           |           | default
>> |
>>  _allowUpdate                  | LINKSET     | OIdentity
>>     | false     | false    | false    |           |           | default
>> |
>> -------------------------------+-------------+--------------
>> -----------------+-----------+----------+----------+--------
>> ---+-----------+----------+
>>
>>
>> INDEXES (3 altogether)
>> -------------------------------+----------------+
>>  NAME                          | PROPERTIES     |
>> -------------------------------+----------------+
>>  PumpUp.replacedACL            | replacedACL    |
>>  PumpUp.objectId               | objectId       |
>>  PumpUp.updatedAt              | updatedAt      |
>> -------------------------------+----------------+
>>
>>
>> But am still getting a very slow query:
>> orientdb {pumpup}> select count(*) from post; select from post order by
>> updatedAt desc limit 10
>>
>>
>> ----+------+------
>> #   |@RID  |count
>> ----+------+------
>> 0   |#-1:-1|562449
>> ----+------+------
>>
>>
>> 1 item(s) found. Query executed in 0.005 sec(s).
>> ----+---------+------+-------+--------+---------+---------+-
>> --------+---------+---------+---------+---------+---------+-
>> --------+---------+---------+---------+---------+---------+-
>> --------+---------+---------+---------
>> #   |@RID     |_allow|private|actionId|likeCount|relatedId|objectId
>> |isOptimiz|commentCo|note     |hashtagsP|relatedId|
>> showInPop|mentionsP|activityL|createdAt|updatedAt|ACL      |user
>> |workoutLo|activityL|details
>> ----+---------+------+-------+--------+---------+---------+-
>> --------+---------+---------+---------+---------+---------+-
>> --------+---------+---------+---------+---------+---------+-
>> --------+---------+---------+---------
>> 0   |#22:56...|[1]   |false  |1300    |0
>>  |wCzAgA...|TcbNo7...|true     |0        |null     |true     |true
>> |false    |null     |true     |2014-0...|2014-0...|{NKXBg...|{__typ...|null
>>     |{__typ...|null
>> 1   |#22:56...|[1]   |false  |1300    |0
>>  |qtD8fi...|DzDs8s...|true     |0        |Just d...|true     |true
>> |false    |null     |true     |2014-0...|2014-0...|{M5uAi...|{__typ...|null
>>     |{__typ...|null
>> 2   |#22:56...|[1]   |null   |207     |0
>>  |4xZ5m8...|XSPIL4...|true     |0        |null     |true     |true
>> |null     |null     |null     
>> |2013-0...|2014-0...|{*={re...|{__typ...|{__typ...|null
>>     |{"calo...
>> 3   |#22:56...|[1]   |null   |207     |0
>>  |SzYHuf...|rDI2gj...|true     |0        |null     |true     |true
>> |null     |null     |null     
>> |2013-0...|2014-0...|{*={re...|{__typ...|{__typ...|null
>>     |{"calo...
>> 4   |#22:56...|[1]   |null   |207     |0
>>  |fxDE6N...|Tq422o...|true     |0        |Good     |true     |true
>> |null     |null     |null     
>> |2013-0...|2014-0...|{*={re...|{__typ...|{__typ...|null
>>     |{"calo...
>> 5   |#22:56...|[1]   |null   |207     |0
>>  |bF0os7...|couPB8...|true     |0        |null     |true     |true
>> |null     |null     |null     
>> |2013-0...|2014-0...|{*={re...|{__typ...|{__typ...|null
>>     |{"calo...
>> 6   |#22:56...|[1]   |null   |207     |0
>>  |CAVFoT...|MVJRkX...|true     |0        |null     |true     |true
>> |null     |null     |null     
>> |2013-0...|2014-0...|{*={re...|{__typ...|{__typ...|null
>>     |{"calo...
>> 7   |#22:56...|[1]   |null   |207     |0
>>  |kJ1RTD...|sDrLhX...|true     |0        |null     |true     |true
>> |null     |null     |null     
>> |2013-0...|2014-0...|{d4CpX...|{__typ...|{__typ...|null
>>     |{"calo...
>> 8   |#22:56...|[1]   |false  |1       |0        |null
>> |Qqj1ru...|true     |0        |null     |true     |null     |null     |true
>>     |null     |2014-0...|2014-0...|{ldsbq...|{__typ...|null     |null
>>   |null
>> 9   |#22:56...|[1]   |false  |1       |0        |null
>> |zVSfuW...|true     |0        |null     |true     |null     |null     |true
>>     |null     |2014-0...|2014-0...|{*={re...|{__typ...|null     |null
>>   |null
>> ----+---------+------+-------+--------+---------+---------+-
>> --------+---------+---------+---------+---------+---------+-
>> --------+---------+---------+---------+---------+---------+-
>> --------+---------+---------+---------
>>
>>
>> 10<span style="color: #000;" class="st
>> ...
>
>  --
>
> ---
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to