GeoTools
  1. GeoTools
  2. GEOT-2572

Support estimated extents in postgis-ng

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7-M3
    • Component/s: jdbc
    • Labels:
      None

      Description

      The current postgis datastore allows usage of the estimated extents function to quickly compute bounds of multi-million row datasets quickly by fast inspection of the index optimizer statistics.
      The NG one does not, and in order to support it, we'll need to make some API changes as the estimated extent is not a query that is applied on a table, but look like:

      select estimated_extent('tableName', 'columnName')
      

      The oracle plugin needs this to use the SDO_TUNE fast bbox computations as well, but with a twist, in that case the function always returns a correct result provided the data is in a projected CS (so it's always a good choice with the right data set, it's not a matter of user setup).

      In both cases it seems the dialect class should be modified to allow the specific dialect to completely take over the computation of extents for a given set of geometries.

      1. GEOT-2572-v1.patch
        10 kB
        Andrea Aime
      2. GEOT-2572-v2.patch
        27 kB
        Andrea Aime

        Issue Links

          Activity

          Hide
          Justin Deoliveira added a comment -
          Cool, that sounds good to me.
          Show
          Justin Deoliveira added a comment - Cool, that sounds good to me.
          Hide
          Andrea Aime added a comment -
          Hi, here is an improved and potentially final version of the patch. In the end I followed Justin suggestion and simplified the code while I was at it.
          Please review :-)
          (I'm setting up the layers on the benchmarking server and I don't want to wait forever for the bounds to compute, nor to manually cut and paste the bounds for 15 or so layers... :-p )
          Show
          Andrea Aime added a comment - Hi, here is an improved and potentially final version of the patch. In the end I followed Justin suggestion and simplified the code while I was at it. Please review :-) (I'm setting up the layers on the benchmarking server and I don't want to wait forever for the bounds to compute, nor to manually cut and paste the bounds for 15 or so layers... :-p )
          Hide
          Christian Mueller added a comment -
          Tested with DB2, all tests ok
          Show
          Christian Mueller added a comment - Tested with DB2, all tests ok
          Hide
          Andrea Aime added a comment -
          Fixed on trunk (including Oracle bounds computation speedup)
          Show
          Andrea Aime added a comment - Fixed on trunk (including Oracle bounds computation speedup)
          Hide
          Andrea Aime added a comment -
          Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update
          Show
          Andrea Aime added a comment - Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update

            People

            • Assignee:
              Andrea Aime
              Reporter:
              Andrea Aime
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: