[Glass] Where are indices really useful ?
Mariano Martinez Peck via Glass
glass at lists.gemtalksystems.com
Sat Jan 28 08:25:58 PST 2017
Vía phone.. Quick answer.. Small double are immediate objects so always are
identical. Can you measure performance with identity index?
On Jan 28, 2017 12:03 PM, "Marten Feldtmann via Glass" <
glass at lists.gemtalksystems.com> wrote:
> Yes, I know: indices are a world of their own. But I asked myself, what
> can an index bring for me.
>
> I had an IdentitySet with around 3759515 elements. The objects contained
> have several attributes, but I am only considering one attribute for my
> queries via GsQuery: the attribute instances are member of SmallDouble, no
> nil containing.
>
> I produced a query like:
>
> "(40,0 <= each.floatvalue <= 60,0)"
>
> and the results are around 1719852 elements (around 50 % of the total
> numbers of elements). I do not select the returned objects I just count
> them.
>
> When I define an index on this set (equalityIndex) it took around 6
> seconds to count them all, without index creation the system get the job
> done in 2.5 seconds. (always a warm database).
>
> SQLite3 takes around 0.7s without index and 0.17s with index (total
> numbers are not useful here, but it shows that here an index is useful).
>
> It seems for me, that an index in Gemstone is useful, IF the number of
> expected elements are really small .
>
>
> Any comment ?
>
> Marten
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20170128/ec45442b/attachment.html>
More information about the Glass
mailing list