ST_Estimated3DExtent

Updated at:

Returns a box3d bounding box that estimates the 3D spatial extent of all sfmesh values in a table. The estimate is derived from a 3D index or 3D statistical histogram.

Syntax

box3d ST_Estimated3DExtent(cstring schema_name, cstring table_name, cstring mesh_column_name, boolean parent_only);
box3d ST_Estimated3DExtent(cstring schema_name, cstring table_name, cstring mesh_column_name);
box3d ST_Estimated3DExtent(cstring table_name, cstring mesh_column_name);

Parameters

ParameterDescription
schema_nameThe schema of the table.
table_nameThe name of the table.
mesh_column_nameThe name of the sfmesh field.
parent_onlyFor partitioned tables, specifies whether to estimate the bounding box for the parent table only.

Usage notes

Before calling this function, do one of the following:

  • Create a 3D index on the sfmesh field.

  • Run analyze on the sfmesh field to generate statistical information.

Examples

Example 1: Estimate the bounding box using the schema name, table name, column name, and parent_only flag.

SELECT ST_Estimated3DExtent('public', 'test_table', 'the_mesh', false);

Output:

                   st_estimatedextent
-------------------------------------------------------------------------------------------
 BOX3D(171528.71875 220124.125 -1277.06030273438,336328.71875 300186.96875 35850.00390625)
(1 row)

Example 2: Estimate the bounding box using the table name, column name, and parent_only flag, without specifying a schema.

SELECT ST_Estimated3DExtent('test_table', 'the_mesh', false);

Output:

                   st_estimatedextent
-------------------------------------------------------------------------------------------
 BOX3D(171528.71875 220124.125 -1277.06030273438,336328.71875 300186.96875 35850.00390625)
(1 row)

Example 3: Estimate the bounding box using only the table name and column name.

SELECT ST_Estimated3DExtent('mesh_gist_test', 'the_mesh');

Output:

                        st_estimated3dextent
-------------------------------------------------------------------------------------------
 BOX3D(171528.71875 220124.125 -1277.06030273438,336328.71875 300186.96875 35850.00390625)
(1 row)