billroper: (Default)
[personal profile] billroper
Some time ago, the folks in charge of our web interface decided that we should return data as a .NET DataSet. This may not have been the happiest choice.

Apparently, the indexing in the .NET DataSets is badly broken. I'm trying to do a Select on two columns to retrieve -- in the desired order! -- the 7400 points that are defined as rows in a particular DataSet. The columns are both primary sort keys.

This takes 25 seconds or so to run. If I comment out the Select statement, it takes less than a second to complete the loop.

Supposedly you can do the query against the contained DataRowCollection instead of against the DataTable and that will be faster. It isn't.

Supposedly you can force the table to create an index for a column and it will be faster. That might be true, but doesn't work when you need to search on more than one column.

Overall, this is so broken it isn't even funny.

I think I'll go to England.

Date: 2008-01-30 03:38 am (UTC)
From: [identity profile] scs-11.livejournal.com
In my experience with RDBMs, any large query which included a sorted result could be sped up 10 to 100-fold by fetching the data unsorted, then sorting it yourself. Damned if I know why, and it baffled the DBAs as well. Could have been an artifact of our ludicrously complicated schema, but who knows.

Profile

billroper: (Default)
billroper

January 2026

S M T W T F S
     1 2 3
4 5 6 7 8910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 10th, 2026 02:04 am
Powered by Dreamwidth Studios