Technical support This forum is closed.
Version 1.x > Technical support > BUG: ParentNodeID=0 View modes: 
User avatar
Member
Member
wtijsma - 6/28/2005 4:00:32 PM
   
BUG: ParentNodeID=0
Hi Petr,

I'm using the TreeProvider to select multiple documents (from multiple document templates) from the database, but somehow the parentNodeId always returns 0. If I use SQL profiler the returned dataset is correct, but somewhere in FilterOutLocalizedVersion or something like it, the values get lost.

I also noticed that there's a pretty high performance impact, I suspect because you run --multiple-- select statements on the tables for --each-- row. These are extremely expensive operations (especially because it's running on datasets with +3000 rows), and it would be much better if you leave this kind of "JOIN" functionality to the system that is specialized in these kind of operations : the database.

Thanks, Wiebe

User avatar
Guest
admin - 6/29/2005 6:01:52 PM
   
Re: BUG: ParentNodeID=0
Hi Wiebe,

we will check this and try to fix it in the nearest version.

Regarding multiple queries - do you set the CheckPermissionsForUserID parameter? If so, this can be the reason. Could you please send me the code you use to retrieve documents?

Of course, we always try to eliminate queries to minimum number. Unfortunately, some operations (such as row-level permission checking) cannot be completely implemented in one query.

Thank you.

Best Regards,

User avatar
Member
Member
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 ;-)

User avatar
Guest
admin - 6/30/2005 1:47:13 PM
   
Re: BUG: ParentNodeID=0
Yes, this was, unfortunately, the "best" way how to do that so far. We are going to significantly improve the whole multilingual support in version 2.0. I hope we will also manage to fix this issue. Thank you for pointing this out.

User avatar
Member
Member
wtijsma - 6/30/2005 2:07:45 PM
   
Re: BUG: ParentNodeID=0
Cool, are you going to change the database schema as well?

that would be great...

Thanks, Wiebe

User avatar
Guest
admin - 7/11/2005 9:11:44 PM
   
Re: BUG: ParentNodeID=0
Probably yes.

User avatar
Member
Member
lucasrem - 7/15/2005 7:42:58 AM
   
Re: BUG: ParentNodeID=0
so great that you can still develope updates for the Kentico CMS please leave Net industry open for comments etc,

togetter we can make great stuff

lucas rem
www.netindustry.nl