Opened 12 years ago

Closed 12 years ago

#1888 closed defect (fixed)

GwsQueryEngine evaluates incorrect join algorithm for joins involving SDF/SHP sources

Reported by: jng Owned by:
Priority: high Milestone: 2.4
Component: Server Version:
Severity: major Keywords:
Cc: External ID:

Description

Sortability is a critical metric for optimum feature join performance.

Currently the GwsQueryEngine does a check to see if select ordering is supported via the FDO provider capabilities. This check is not actually the final determinator for sortability, because sorting is also exposed via the FdoIExtendedSelect command, but this command only allows sorting on one property.

Therefore SDF/SHP sources, though they do not support standard select ordering, do support ordering via the FdoIExtendedSelect command, so the GwsQueryEngine needs to check for this as well.

Attached is a patch that updates the sortability check. A given side of the join supports ordering if <it supports standard select ordering> --OR-- <it supports FdoIExtendedSelect command and only one property is being joined>

In my test cases, a full read from our joined test data (Sheboygan Parcels split into <ID/Geom> and <Attribute> halves, in SDF and SQLite flavours), where it previously used Nested Loops or Nested Loops sorted block (because the SDF side failed the sortability check, resulting in 20min execution time), it now uses sort merge (both sides pass the sortability check, resulting in 20s execution time).

Attachments (2)

1888.patch (5.3 KB ) - added by jng 12 years ago.
Patch to fix incorrect sortability checking
1888_2.patch (1.2 KB ) - added by jng 12 years ago.
Patch to refine property name checking for chained joins

Download all attachments as: .zip

Change History (5)

by jng, 12 years ago

Attachment: 1888.patch added

Patch to fix incorrect sortability checking

comment:1 by jng, 12 years ago

Resolution: fixed
Status: newclosed

Fixed with r6333

comment:2 by jng, 12 years ago

Resolution: fixed
Status: closedreopened

This patch breaks the TestCase_JoinFeaturesChainedInner1ToMany() test.

by jng, 12 years ago

Attachment: 1888_2.patch added

Patch to refine property name checking for chained joins

comment:3 by jng, 12 years ago

Resolution: fixed
Status: reopenedclosed

Supplemental fix submitted in r6348

Note: See TracTickets for help on using tickets.