SQL Server Performance

  • Home
  • Articles
  • Forums
  • Tips
  • Training
  • FAQ's
  • Blogs
  • Software
  • Books
  • About Us
RSS Feeds
Sign in | Join


Article Topics

All Articles
Performance Tuning
Audit
Business Intelligence
Clustering
Reporting Services
SQL Azure
Developer
General DBA
ASP.NET / ADO.NET
SQL Azure

Training Videos

Check out our new SQL Server Training Videos section More...

Write for Us

Share your SQL Server knowledge with others and raise your profile in the community More...
Latest Articles

50 Tips to Boost Performance of an ASP.NET Application - ...
50 Tips to Boost Performance of an ASP.NET Application - ...
Understanding WCF Hosting
SQL Server Logical Reads – What do they really tell us? ...

More     
 
Latest FAQ's

Will Check Constraints Improve Database Performance?
The Excel Connection Manager is not supported in the 64-bit version ...
Is there a difference between fill factor 0 and 100 ...
An ASP.NET setting has been detected that does not apply in ...

More     
   
Latest Software Reviews

Spotlight on ApexSQL Diff - Server-based database comparison tool ...
Spotlight on ApexSQL Data Diff - Server-based database comparison tool ...
Spotlight on ApexSQL Doc 2008
ApexSQL Enforce

More     

articles >> developer >> Powerful Geographical Visualisations made easy with SQL ...

Powerful Geographical Visualisations made easy with SQL 2008 Spatial (Part 1)

By : John O'Brien
Nov 24, 2008

Page 2 / 2


Using ‘Reduce’ to simplify polygons
The data visualisation we are about to perform is very sensitive to the complexity of the Geography fields we use. If we don’t need the extreme detail at the level we will view from, we can remove points using the Reduce() method. For example here is a highly complex and detailed geography of Australia with Reduce set to 100,000, 10,000, 1,000, 100 and 0.



SELECT geom.Reduce(X) FROM dbo.AUS0

Statistical Data
The UN data was available as an Excel spread sheet, drop all the cells that where irrelevant and import as “WorldCO2Emissions”

We can carry out a simple query like:

Country  2004 CO2 Emissions  
United States 6049436
China 5010170
Russia 1524993
India 1342962
Japan 1257963

SELECT TOP 5 Country, [2004] FROM dbo.WorldCO2Emissions ORDER BY [2004] DESC

Clean up
Our next step is to join the country polygons with the statistical data, we will have to join on country name but unfortunately these can be slightly different. I found this was a short manual process of matching those currently not joined as best as possible by renaming to match. Many data sets use the 3 letter country code which is more reliable.

Important to note is that the world is an ever changing place, the names of countries and their borders shift often. For example the statistical data for 1990 contains CO2 emissions for the USSR. I would need to match to a set of World geography from 1990 to be accurate. I will stick with 2004 only here.

I find the best thing to do with data visualisation is to ask a specific question of the data. In this case we ask, What does the World look like if its land mass is reallocated based on CO2 emissions per country in 2004?  In part 2 will show how we can anser this question with SQL Server 2008.


<< Prev Page         








C# Help and Tutorials | PHP MySQL Tutorial | Sharepoint Tutorial | Azure Tutorial | Home | Peformance Articles | Audit Articles | Business Intelligence Articles | Clustering Articles | Developer Articles | Reporting Services Articles | DBA Articles | ASP.NET / ADO.NET Articles | SQL Server Training Videos | DBA FAQ's | Developer Peformance FAQ's | DBA Peformance FAQ's | Developer FAQ's | Clustering FAQ's | Error Messages | Audit Tool Reviews | Backup Tool Reviews | Coding Tool Reviews | Compare Tool Reviews | Documentation Tool Reviews | Design Tool Reviews | Monitoring Tool Reviews | Log Tool Reviews | Reporting Tool Reviews | Clustering Tool Reviews | Security Tool Reviews | Change Management Tool Reviews | Remote Access Tool Reviews | Book Reviews | Security Tool Reviews | QDPMA Performance Tuning | ADO.NET / ASP.NET | Administration | Analysis/OLAP Services | Application Development | Configuration | Components | ETL | Hardware | High Availability | Hints | Index | Misc | Operating Systems | Performance Tuning | Replication | T-SQL | Views


              © 2010 Jude O'Kelly. All rights reserved