CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Low Cardinality Indexes & Red/Black Tree Index LINQ to CSLA

rated by 0 users
This post has 1 Reply | 2 Followers

Top 25 Contributor
Posts 308
Jack Posted: Tue, Nov 18 2008 8:54 AM

I do a lot of filtering based on Y/N or 1/0 indicators - I just wanted to confirm that a Red/Black tree index is just a balanced tree of the unique values that essentially points to a bucket of underlying objects?  So the cardinality is not really an issue.

Thanks

Jack

Top 10 Contributor
Posts 9,269

I don't think you'd want to use Indexable on such properties.

A RB tree is just a balanced binary tree, using the property value as an indexer. So if your property values are just T/F or 0/1 then you'll have a horribly distorted tree and you might as well avoid the indexing overhead and just allow any query to do a linear scan of the collection (because that's about all you'd get anyway).

Rocky

Page 1 of 1 (2 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems