How to define index/view from webservice
marvinq
Member Posts: 69
Hi,
Say I have build a CustomerFilter and a CustomerList function, to get customers in a given city (from c# via webservices) (se code).
Anyone who knows how the general sorting is when writing such a code from c# to the NAV Webservice?? If a create a new SQL key with "City", will the webservice then automatically find the index that fits the best, or will it as default take the primarykey??
Is there any way to defines which index/view I would like to use? Searching for city I guess is quite "heavy".
/Marvin
Say I have build a CustomerFilter and a CustomerList function, to get customers in a given city (from c# via webservices) (se code).
public List<CustomerList_Filter> CustomerFilter(string city)
{
List<CustomerList_Filter> filterListe = new List<CustomerList_Filter>();
CustomerList_Filter filter = new CustomerList_Filter();
filter.Field = CustomerList_Fields.City;
filter.Criteria = "" + city;
filterListe.Add(filter);
return filterListe;
}//CustomerFilter
public CustomerList[] CustomerList(List<CustomerList_Filter> filter)
{
return customerList.ReadMultiple(filter.ToArray(), null, 1000);
}//CustomerList
Anyone who knows how the general sorting is when writing such a code from c# to the NAV Webservice?? If a create a new SQL key with "City", will the webservice then automatically find the index that fits the best, or will it as default take the primarykey??
Is there any way to defines which index/view I would like to use? Searching for city I guess is quite "heavy".
/Marvin
0
Comments
-
Used Index is on SQL. SQL will decide which index will be used. Of course, sorting depends on key which is set on the page in NAV.0
-
Okay, so setting the "SourceTableView" on the page to something like what I expect to search for will most likely improve speed?
It would have been great if I was able to define the index from C#.0 -
SourceTableView will change only Order by part of the select statement. Index will be still selected by SQL, based on all the rules used (statistics, filtered fields, sorting order and other) to generate best execution plan. It could have impact to this, but it is just on SQL what will select.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
