Skip to content

lookup operation performance is bad #5

@RogerWaters

Description

@RogerWaters

Hi,
I came up with some tests of your database implementation and find out that every lookup operation performs really bad on big data.
It seems that nearly 40% of the time is taken by Task.Wait().

To check the performance you can easily extend your Getting-Started example by the following block:

            //lookup
            Console.WriteLine("Lookup...");
            sw.Reset();
            c = 0;
            using (IStorageEngine engine = STSdb.FromFile(FILE_NAME))
            {
                ITable<long, Tick> table = engine.OpenXTable<long, Tick>("table");
                //select all ids to be sure there is a match
                var ids = table.Select(kvp => kvp.Key).ToList();
                //loading keys is not part of measurement
                sw.Start();
                foreach (var id in ids) //table.Forward(), table.Backward()
                {
                    var data = table.Find(id);
                    //Console.WriteLine("{0} {1}", id, data);

                    c++;
                    if (c % 100000 == 0)
                        Console.WriteLine("Found {0} records", c);
                }
            }
            sw.Stop();
            Console.WriteLine("Lookup speed:{0} rec/sec", sw.GetSpeed(c));

Do you have any plans on increasing lookup performance?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions