Returns the estimated 3D bounding box of all sfmesh objects in a table, using a 3D index or statistical histogram data.
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
| Parameter | Description |
|---|---|
schema_name | The schema of the table. |
table_name | The name of the table. |
mesh_column_name | The name of the sfmesh column. |
parent_only | For partitioned tables, specifies whether to estimate the bounding box for the parent table only. |
Description
ST_Estimated3DExtent returns a box3d bounding box that covers all sfmesh objects in the specified table. The estimate is derived from existing index or statistics data.
Before calling this function, do one of the following:
Create a 3D index on the sfmesh column.
Run
ANALYZEon the table to generate statistical histogram data for the sfmesh column.
Examples
Example 1: Estimate the 3D extent of the the_mesh column in public.test_table, including child partitions.
SELECT st_estimated3dextent('public', 'test_table', 'the_mesh', false);
st_estimatedextent
-------------------------------------------------------------------------------------------
BOX3D(171528.71875 220124.125 -1277.06030273438,336328.71875 300186.96875 35850.00390625)
(1 row)Example 2: Estimate the 3D extent without specifying a schema, including child partitions.
SELECT st_estimated3dextent('test_table', 'the_mesh', false);
st_estimatedextent
-------------------------------------------------------------------------------------------
BOX3D(171528.71875 220124.125 -1277.06030273438,336328.71875 300186.96875 35850.00390625)
(1 row)Example 3: Estimate the 3D extent using the two-parameter form (no schema, no partition filter).
SELECT st_estimated3dextent('mesh_gist_test', 'the_mesh');
st_estimated3dextent
-------------------------------------------------------------------------------------------
BOX3D(171528.71875 220124.125 -1277.06030273438,336328.71875 300186.96875 35850.00390625)
(1 row)