In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "how to create ADO.NET query". In daily operation, I believe many people have doubts about how to create ADO.NET query. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to create ADO.NET query". Next, please follow the editor to study!
Query and result
This article uses the NorthWind database as the model and creates a simple query:
(NorthwindEntities ne = NorthwindEntities ()) {(Order o ne.Orders) {I = o.OrderID;}}
During the test, each query traversed the entire 848 rows of data 10 times. The results are interesting: the first run took 4241 milliseconds, while the next run took an average of about 13 milliseconds. The most time-consuming part of the content is the creation of ObjectContext, and the ADO.NET team will have some time-consuming operations when performing any operation to access the database.
The time-consuming percentage value * * is view generation, which reaches an astonishing 56%. Since view generation is the main culprit for performance degradation, developers * use the command line tool EDM generator (EdmGen.exe), the runtime needs to add the view generation command parameter (/ mode:ViewGeneration), and the output of the ADO.NET team is a code file (C # or VB.NET) that can be included in the project. The pre-generation of the view can reduce the startup time to 2933 milliseconds, while for loop traversal operations, the overall time can be reduced by 28%. Generating views and publishing them with the application is a great way to improve performance, but the disadvantage is that the views are no longer dynamic, and once the model changes, they need to be regenerated to stay synchronized.
At this point, the study on "how to create an ADO.NET query" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.