SQL Server Central is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
Search:  
 
 

XML - Good and Bad

By Vasant Raj, 2006/06/05

Total article views: 9545 | Views in the last 30 days: 15

Introduction

XML!!! It has brought advantages for the applications which we are creating. Using it, it is possible to create flexible and expandable applications. Because of the small size of files, the data transfer speed has also increased considerably, especially for web applications.

This text will not discuss about what XML is and how it is used. For that, you can go through XML simplified.

The process...

Few months back, as my team started using XML in one of our application, we were surprised by the ease with which the tasks were completed. XML was used mainly for database interactions as we need to do multiple updates, which were around thousands in number (by using the OPENXML feature of SQL Server 2000).

Now, going forward XML became the backbone of our applications and was used extensively.

Over-use!!!

Now comes the OVERUSE part which really made us work twice as the performance degraded because of XML. One of the features of our application was to build the windows explorer like structure for some set of directories i.e., displaying all the directories and files under a particular directory. All the required details were available in the database.

First, we retrieved the list of all the directories and the files for each directory. As, a tree-like structure was to be created, parent and child relation was required (this was stored in the database). With the complete result set, an XML file was created which stored the directory and its files details and also following the parent-child relation. By looking at the XML file, you can figure out the actual directory structure.

Now, the tree was to be displayed. So it was decided to use flex-grid and the XML file. It worked very nicely and fast, but the performance started degrading as the number of directories increased.

By really debugging hard, the bottleneck for this degradation was found, and to our surprise, it was the intermediate step of XML file creation. The recursion process for creating the parent-child relation in the XML file was repeated again for creating the actual tree-like structure in the flex-grid.

Conclusion

The result of this was weeks of re-work and a lesson learnt. Not every good thing can give you performance, unless all the pros and cons are taken care of before the actual implementation.

By Vasant Raj, 2006/06/05

Total article views: 9545 | Views in the last 30 days: 15
Your response
 
 
Related tags

Miscellaneous    
XML    
 
Like this? Try these...

SQL Server 2005 In-Place Upgrade Versions

By Key DBA | Category: SQL 2005
(not yet rated) | 2,672 reads
Already registered?  

Free registration required

To read the rest of this article, and access thousands of other articles, we ask you to register on the site and subscribe to our newsletters.

Register

E-mail address:
Password:
Password (confirm):

  

Subscriptions

We ask you to register on the site and subscribe to our newsletters. Subscribing to our newsletters gets you:

  • ALL of our content (thousands of articles, scripts, and forum postings)
  • A daily newsletter (example)
  • A weekly news round up (example)
  • The opportunity to ask and answer questions in our forums
  • A daily Question of the Day to test and help you increase your knowledge of SQL Server.

We ask that you give the newsletter a try for a week. Over 200,000 SQL Server Professionals a day find it entertaining and useful. If not, you are welcome to unsubscribe at anytime.

Steve Jones
Editor, SQLServerCentral.com