I am looking for a way to do an advanced query quickly and efficiently.
Given the following XML structure read into a DataSet of people and the
colors they are wearing:
<Person>
<Name>One</Name>
<Color>Red</Color>
<Color>Green</Color>
<Color>Blue</Color>
</Person>
<Person>
<Name>Two</Name>
<Color>Red</Color>
<Color>Green</Color>
<Color>Orange</Color>
</Person>
<Person>
<Name>Three</Name>
<Color>Blue</Color>
<Color>Green</Color>
<Color>Orange</Color>
</Person>
Which would give me two related tables in my DataSet, Person and Color, and
assume that there are tens of thousands of people in the table.
How do I query for all people wearing red? It seems as if this should be
possible, even simple, but I can't find a way to do it. Doing it row by row
by using CreateChildView would take forever even on a screaming system.
Querying the color table and then building a big honking query from the
Person_id column (that ADO.NET puts in place to relate things in this
circumstance) seems like it would be slow as well. How long would it take
ADO to parse a search statement with 10,000 ORs? Ugh.