wtijsma
-
6/29/2005 6:53:21 PM
Re: BUG: ParentNodeID=0
Hi Petr,
Thanks, but I don't mean database queries, I mean dataset queries in TreeProvider.FilterOutLocalizedVersions().
Basically, what you're doing here:
- duplicate the entire dataset
- loop through each row - - for each row, you execute 2x DataTable.Select()
- loop through each row again - - for each row, you perform a DataTable.Select() again - - - for each selected row, you perform a DataTable.Select() again
- loop through each row again - - perform a DataTable.Select() again
suppose I want to retrieve 1 DataTable with 1200 records, this is how many times you execute a DataTable.Select():
1200 + 1200 + 1200 = 3600 Selects to retrieve 1 localized datatable.
Well, in my case I need to retrieve 3 related datatables with an average of 1200 records, so that's 3600 * 3 = 10800 Selects() on the DataSet.
In that case, I didn't even use the CheckPermissionsForUserID yet, how many selects would that add?
I could be wrong though, I didn't completely step through it...
I'm sorry to say, but if you can't apply this kind of permission/localization filtering with a (or some) database queries, couldn't this mean there's a flaw in your database design somewhere?
These kind of calculations make me happy to have a multi-processor dedicated server ;-)
|