Hi, You can create as many indexes as you want, but it will consume more memory and hurt insert performance ([1], [2]). As with any SQL db, you have to decide which kinds of queries need indexes more than others.
[1] https://apacheignite.readme.io/docs/sql-queries#choosing-indexes [2] http://www.h2database.com/html/performance.html#storage_and_indexes Pavel. On Wed, Jun 22, 2016 at 11:42 AM, Alexei Scherbakov < [email protected]> wrote: > Hi, > > I suppose OrderId is unique field, right ? > > If yes, what's the point in sorting on both OrderId and OrderName ? > > > 2016-06-22 10:53 GMT+03:00 mrinalkamboj <[email protected]>: > >> Following is my Poco class, my query include a set of filters on few >> columns, >> which is facilitated using the QuerySqlField attribute, further there's >> multiple column sorting, for which the fields are indexed, now my >> understanding is indexing has a role only in sorting, but in this case >> user >> can ask for Ascending or Descending and the combination of columns like >> "OrderId Asc,OrderName desc" >> >> - What kind of index can facilitate this kind of query ? >> - Can a field be indexed for both ascending and descending ? >> - Are the group indexes required in this case ? >> >> In my view it might not be practical to create index for all the >> >> public class OrderEntity >> { >> [QuerySqlField(IsIndexed = true)] >> public int OrderId { get; set; } >> >> [QuerySqlField(IsIndexed = true)] >> public string OrderName { get; set; } >> >> [QuerySqlField(IsIndexed = true)] >> public DateTime OrderDateTime { get; set; } >> >> [QuerySqlField(IsIndexed = true)] >> public double OrderValue { get; set; } >> >> [QuerySqlField(IsIndexed = true)] >> public string OrderAddress { get; set; } >> } >> >> >> >> -- >> View this message in context: >> http://apache-ignite-users.70518.x6.nabble.com/Multiple-column-filtering-and-sorting-in-Apache-Ignite-tp5783.html >> Sent from the Apache Ignite Users mailing list archive at Nabble.com. >> > > > > -- > > Best regards, > Alexei Scherbakov >
