Hi Erik, You can define two different indexes, one of them will be used for the query, but not both, so the performance of the query will depend on how many hits you have on a single index.
Thanks Luigi 2016-02-29 12:18 GMT+01:00 Erik Pragt <[email protected]>: > Hi Andrey, > > Also thanks for the link. What will happen if I don't use a composite > index, but just add one or two separate indexes? Will OrientDB still use > the query if I search for bigger-than results? > > Thanks, > > Erik > > On Monday, February 29, 2016 at 9:05:00 PM UTC+11, Andrey Lomakin wrote: >> >> Hi guys, >> >> FYI https://github.com/orientechnologies/orientdb/issues/1288 . >> But it is not in our short term roadmap. >> >> >> On Mon, Feb 29, 2016 at 11:27 AM Luigi Dell'Aquila <[email protected]> >> wrote: >> >>> Hi Erik, >>> >>> Right now there is no support for such use case, you can define an index >>> on both fields but it will be used only for one of them. >>> I can think to a hack in 2.2, using a spatial index and doing a 2D >>> spatial search, but again, it would be a hack. >>> >>> Thanks >>> >>> Luigi >>> >>> >>> >>> 2016-02-28 12:43 GMT+01:00 Erik Pragt <[email protected]>: >>> >>>> Hi all, >>>> >>>> I have a document database with 1.000.000 Persons in it. Persons have a >>>> name, an age, and number of children. Now I want to find the persons who >>>> are older than 40 and have more than 3 children. This is taking a long >>>> time, because there's no index on the Persons table/collection. >>>> >>>> What kind of index do I need to create to make this performant? Two >>>> indexes, one per field? One composite index? Any suggestions would be >>>> welcome! >>>> >>>> Thanks, >>>> >>>> Erik >>>> >>>> -- >>>> >>>> --- >>>> 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. >>> >> -- >> Best regards, >> Andrey Lomakin, R&D lead. >> OrientDB Ltd >> >> twitter:@Andrey_Lomakin linkedin:https://ua.linkedin.com/in/andreylomakin >> > -- > > --- > 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.
