Improving data access performance – Pitney Bowes MapXtreme User Manual

Page 195

Advertising
background image

Chapter 8: Working with Data

Improving Data Access Performance

MapXtreme v7.1

202

Developer Guide

Improving Data Access Performance

Performance is always an important aspect to any application that accesses data. Consider the
following list in your design and development plans for your application.

Only request the data you need (especially from an RDBMS). This limits the amount of data sent
over the connection.

For web applications, put attribute column information into the workspace file, so that all needed
data will be pre-loaded at the MapInfo Session creation time. For an example, see

Overview of

the Thematics Sample

.

Only sort tables if you need an ordered list. This process takes time to read through the entire
table to build an order. Also it will be slower if there is no index on the column.

Only scroll if you need random access to a table. This also builds indexes to speed up access
and remember order. Data readers access the data directly with no need to read extra data.

Use consistent coordinate systems for Join and Search operations. This eliminates the need to
convert geometries for every access.

Use indexed columns for Join / Filter / Sort / Aggregate operations.

Use CentroidWithin, ContainCentroid, and EnvelopesIntersect prior to actually checking for
geometry intersects. These tests are very quick and in most cases eliminate a lot of geometries
from your list with little effort.

Use BeginAccess/EndAccess (especially for file-based tables) when performing multiple queries
and/or edits.

Try to avoid calls such as Area and Buffer in the Where clause because the operation will have
to be done each time a new cursor is created.

Try to avoid calls such as Area and Buffer in the Select list when defining a view or result set for
similar reasons.

Use result sets for intermediate results or operations where you manage keys. These are very
light weight and afford quick direct access back to the original data.

Advertising