Changes between Version 7 and Version 8 of MapGuideRfc123
- Timestamp:
- 11/03/11 20:37:25 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MapGuideRfc123
v7 v8 101 101 === The FDO join feature reader === 102 102 103 The existing MgServerFeatureReader will be modified to incorporate iteration logic to handle forcing 1:1 in the resulting FDO feature reader.103 We will include a custom server-only implementation of FdoIFeatureReader (MgFdoForcedOneToOneFeatureReader) which wraps an existing FdoIFeatureReader to incorporate iteration logic to handle forcing 1:1 cardinality on the iterated results. 104 104 105 When 1:1 cardinality is not being forced, this reader behaves like a normal feature reader. 105 This reader behaves like a normal feature reader. All FdoIFeatureReader calls pass through to the underlying reader, except for ReadNext() 106 106 107 In the case of the forcing of 1:1 cardinality, we take a different path and employ the following logic for ReadNext():107 To force 1:1 cardinality, the ReadNext() method employs the following logic: 108 108 109 109 1. Read the current identity property values. Hash these values into a string and check if this hashed string exists in an internal std::set. … … 111 111 3. Store this hashed string into the internal set for future comparisons. 112 112 113 Iteration logic for the normal case (not 1:1), is simply to pass over to the underlying reader's ReadNext() method. Tracking of identity property values is not required for this case. 113 Depending on whether 1:1 cardinality is forced, the final reader that is returned to the web tier will either be: 114 115 {{{ 116 MgServerFeatureReader (containing...) 117 FdoIFeatureReader (from FdoIExtendedSelect::Execute()) 118 }}} 119 120 Or if 1:1 is forced 121 122 {{{ 123 MgServerFeatureReader (containing...) 124 MgFdoForcedOneToOneFeatureReader (containing...) 125 FdoIFeatureReader (from FdoIExtendedSelect::Execute()) 126 }}} 114 127 115 128 Performance-wise, support for FDO joins has already been implemented in [http://mg-desktop.googlecode.com mg-desktop] and the benefits there are clear. The performance times for a 17000 feature by 16000 feature join (of [http://code.google.com/p/mg-desktop/source/browse/DesktopTestData/ParcelsJoinTest.sqlite this dataset]) are outlined below. … … 145 158 == Test Plan == 146 159 147 Add unit tests against some sample SQLite feature sources configured to take advantage of these optimizations. Verify that the FDO join optimization path is taken when selecting from these feature sources. 160 Add unit tests against some sample SQLite feature sources configured to take advantage of these optimizations. Verify that the FDO join optimization path is taken when selecting from these feature sources. Also exercise the SpatialExtents() aggregate function against SQLite extended feature classes which can take advantage of this optimization. 148 161 149 162 == Funding / Resources ==