Here's a problem I experience (simplified example):Let's say I have several tables:
One customer can have mamy products and a product can have multiple features.On my asp.net front-end I have a grid with customer info:something like this: \[code\]Name Address John 222 1st st Mark 111 2nd st \[/code\]What I need is an ability to filter customers by feature. So, I have a dropdown list of available features that are connected to a customer. What I currently do:
1. I return \[code\]DataTable\[/code\] of Customers from stored procedure. I store it in viewstate
2. I return \[code\]DataTable\[/code\] of features connected to customers from stored procedure. I store it in viewstate3. On filter selected, I run stored procedure again with new feature_id filter where I do joins again to only show customers that have selected feature. My problem: It is very slow.I think that possible solutions would be:
1. On page load return ALL data in one viewstate variable. So basically three lists of nested objects. This will make my page load slow.2. Perform async loazing in some smart way. How?Any better solutions?Edit:
this is a simplified example, so I also need to filter customer by property that is connected through 6 tables to table Customer.
1. I return \[code\]DataTable\[/code\] of Customers from stored procedure. I store it in viewstate
2. I return \[code\]DataTable\[/code\] of features connected to customers from stored procedure. I store it in viewstate3. On filter selected, I run stored procedure again with new feature_id filter where I do joins again to only show customers that have selected feature. My problem: It is very slow.I think that possible solutions would be:
1. On page load return ALL data in one viewstate variable. So basically three lists of nested objects. This will make my page load slow.2. Perform async loazing in some smart way. How?Any better solutions?Edit:
this is a simplified example, so I also need to filter customer by property that is connected through 6 tables to table Customer.