Skip to main content
Notice removed Draw attention by geogeek
Bounty Ended with artwork21's answer chosen by geogeek
deleted 10 characters in body
Source Link
geogeek
  • 4.6k
  • 5
  • 36
  • 80
[W 10:34:37.710] Command:      QueryWithInfo
[R 10:34:37.710] Long:         1
[R 10:34:37.710] Query Info: 
    Num Columns:   1
    Columns:       "shape"
    SQL_Construct: [1]
    Tables:        "ife_tanant"gebase.sde.borne"point"
    WhereClause:   "type_borne_id<3""type_point_id<3"
    Query Type:    4
    Num Hints:     0
    Num Parameter markers: 0
    Logfile:       <null>
[W 10:34:37.718] Long:         0
[W 10:34:37.718] Col_Defines:  [1]
    Name                                 Type    Width nDec  NULL?   RowID
    -------------------------------- ----------- ----- ---- -------- -----
    shape                            SE_SHAPE        0   0      NULL      
    -------------------------------- ----------- ----- ---- -------- -----
[W 10:34:37.718] Long:         71303299
[W 10:34:37.718] Long:         0
[W 10:34:37.718] CoordRef:
    XY False Origin:       -37644800,, -28128500,
    XY System Units:       10000,
    XY Half SysUnit:       0,00005
    XY Round:              0,0001
    XY Cluster Tolerance:  0,001
    Z  Offset:             -100000,000000
    Z  Units:              10000,000000
    Z  Half SysUnit:       0,000050000
    Z  Round:              0,000100000
    Z  Cluster Tolerance:  0,001
    Measure Offset:        -100000,000000
    Measure Units:         10000,000000
    Measure Half SysUnit:  0,000050000
    Measure Round:         0,000100000
    Measure Cluster Tol:   0,001
    Coordinate System ID:  0
    Coordinate System:     "PROJCS["Nord_Maroc_Degree",GEOGCS["GCS_Merchich_Degree",DATUM["D_Merchich",SPHEROID["Clarke_1880_IGN",6378249.2,293.46602]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",300000.0],PARAMETER["Central_Meridian",-5.4],PARAMETER["Standard_Parallel_1",33.3],PARAMETER["Scale_Factor",0.999625769],PARAMETER["Latitude_Of_Origin",33.3],UNIT["Meter",1.0]]"
    Spatial Reference ID:  102191
    Precision              High [64]
========================================
[W 10:34:37.719] Command:      SetSpatialConstraints
[R 10:34:37.719] Long:         1
[R 10:34:37.719] Short:        2
[R 10:34:37.719] Long:         0
[R 10:34:37.720] Filter Array: [1]
    Table:        IFE_TANANTgebase.SDEsde.BORNEpoint
    Column:       shape
    SearchMethod: SM_ENVP
    Truth:        Must Pass
    FilterType:   SE_SHAPE_FILTER
          FilterShape:
          XY False Origin:       -37644800,, -28128500,
          XY System Units:       10000,
          XY Half SysUnit:       0,00005
          XY Round:              0,0001
          XY Cluster Tolerance:  0,001
          Z  Offset:             -100000,000000
          Z  Units:              10000,000000
          Z  Half SysUnit:       0,000050000
          Z  Round:              0,000100000
          Z  Cluster Tolerance:  0,001
          Measure Offset:        -100000,000000
          Measure Units:         10000,000000
          Measure Half SysUnit:  0,000050000
          Measure Round:         0,000100000
          Measure Cluster Tol:   0,001
          Coordinate System ID:  0
          Coordinate System:     "PROJCS["Nord_Maroc_Degree",GEOGCS["GCS_Merchich_Degree",DATUM["D_Merchich",SPHEROID["Clarke_1880_IGN",6378249.2,293.46602]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",300000.0],PARAMETER["Central_Meridian",-5.4],PARAMETER["Standard_Parallel_1",33.3],PARAMETER["Scale_Factor",0.999625769],PARAMETER["Latitude_Of_Origin",33.3],UNIT["Meter",1.0]]"
          Spatial Reference ID:  102191
          Precision              High [64]
          Feature Number:        0
          Feature Entity Type:   Area        
          Number of Points:      5
          Feature Envelope:
            MinX:    328133,48150, MaxX:    384094,63650
            MinY:    133834,78230, MaxY:    159869,12210
          Polygon Perimeter:        163990,98960
          Polygon Area:          1456911724,87047
---------------------------------------------------------------
Point          X                Y               2D Distance 
---------------------------------------------------------------
    1     328133,48150     133834,78230
    2     384094,63650     133834,78230        55961,155
    3     384094,63650     159869,12210        26034,340
    4     328133,48150     159869,12210        55961,155
    5     328133,48150     133834,78230        26034,340

[W 10:34:37.721] Long:         0
========================================
[W 10:34:37.721] Command:      ExecuteSpatialQuery
[R 10:34:37.721] Long:         1
[W 10:34:37.727] Long:         0
========================================
[W 10:41:17.554] Command:      NextBuffer
[R 10:41:17.554] Long:         1
[W 10:41:17.554] Long:         0
[R 10:41:17.554] Long:         16416
[W 10:41:17.554] Long:         456
[W 10:41:17.554] Short:        -1
[W 10:41:17.554] Long:         0
[W 10:41:17.554] Long:         0
[W 10:41:17.554] Block:
    BufferInfo: [25/16416]  Address@0x26fb0000 
    BufferInHex:    "02008A850100010000000100140000000C0000000100000082..."
[W 10:34:37.710] Command:      QueryWithInfo
[R 10:34:37.710] Long:         1
[R 10:34:37.710] Query Info: 
    Num Columns:   1
    Columns:       "shape"
    SQL_Construct: [1]
    Tables:        "ife_tanant.sde.borne"
    WhereClause:   "type_borne_id<3"
    Query Type:    4
    Num Hints:     0
    Num Parameter markers: 0
    Logfile:       <null>
[W 10:34:37.718] Long:         0
[W 10:34:37.718] Col_Defines:  [1]
    Name                                 Type    Width nDec  NULL?   RowID
    -------------------------------- ----------- ----- ---- -------- -----
    shape                            SE_SHAPE        0   0      NULL      
    -------------------------------- ----------- ----- ---- -------- -----
[W 10:34:37.718] Long:         71303299
[W 10:34:37.718] Long:         0
[W 10:34:37.718] CoordRef:
    XY False Origin:       -37644800,, -28128500,
    XY System Units:       10000,
    XY Half SysUnit:       0,00005
    XY Round:              0,0001
    XY Cluster Tolerance:  0,001
    Z  Offset:             -100000,000000
    Z  Units:              10000,000000
    Z  Half SysUnit:       0,000050000
    Z  Round:              0,000100000
    Z  Cluster Tolerance:  0,001
    Measure Offset:        -100000,000000
    Measure Units:         10000,000000
    Measure Half SysUnit:  0,000050000
    Measure Round:         0,000100000
    Measure Cluster Tol:   0,001
    Coordinate System ID:  0
    Coordinate System:     "PROJCS["Nord_Maroc_Degree",GEOGCS["GCS_Merchich_Degree",DATUM["D_Merchich",SPHEROID["Clarke_1880_IGN",6378249.2,293.46602]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",300000.0],PARAMETER["Central_Meridian",-5.4],PARAMETER["Standard_Parallel_1",33.3],PARAMETER["Scale_Factor",0.999625769],PARAMETER["Latitude_Of_Origin",33.3],UNIT["Meter",1.0]]"
    Spatial Reference ID:  102191
    Precision              High [64]
========================================
[W 10:34:37.719] Command:      SetSpatialConstraints
[R 10:34:37.719] Long:         1
[R 10:34:37.719] Short:        2
[R 10:34:37.719] Long:         0
[R 10:34:37.720] Filter Array: [1]
    Table:        IFE_TANANT.SDE.BORNE
    Column:       shape
    SearchMethod: SM_ENVP
    Truth:        Must Pass
    FilterType:   SE_SHAPE_FILTER
          FilterShape:
          XY False Origin:       -37644800,, -28128500,
          XY System Units:       10000,
          XY Half SysUnit:       0,00005
          XY Round:              0,0001
          XY Cluster Tolerance:  0,001
          Z  Offset:             -100000,000000
          Z  Units:              10000,000000
          Z  Half SysUnit:       0,000050000
          Z  Round:              0,000100000
          Z  Cluster Tolerance:  0,001
          Measure Offset:        -100000,000000
          Measure Units:         10000,000000
          Measure Half SysUnit:  0,000050000
          Measure Round:         0,000100000
          Measure Cluster Tol:   0,001
          Coordinate System ID:  0
          Coordinate System:     "PROJCS["Nord_Maroc_Degree",GEOGCS["GCS_Merchich_Degree",DATUM["D_Merchich",SPHEROID["Clarke_1880_IGN",6378249.2,293.46602]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",300000.0],PARAMETER["Central_Meridian",-5.4],PARAMETER["Standard_Parallel_1",33.3],PARAMETER["Scale_Factor",0.999625769],PARAMETER["Latitude_Of_Origin",33.3],UNIT["Meter",1.0]]"
          Spatial Reference ID:  102191
          Precision              High [64]
          Feature Number:        0
          Feature Entity Type:   Area        
          Number of Points:      5
          Feature Envelope:
            MinX:    328133,48150, MaxX:    384094,63650
            MinY:    133834,78230, MaxY:    159869,12210
          Polygon Perimeter:        163990,98960
          Polygon Area:          1456911724,87047
---------------------------------------------------------------
Point          X                Y               2D Distance 
---------------------------------------------------------------
    1     328133,48150     133834,78230
    2     384094,63650     133834,78230        55961,155
    3     384094,63650     159869,12210        26034,340
    4     328133,48150     159869,12210        55961,155
    5     328133,48150     133834,78230        26034,340

[W 10:34:37.721] Long:         0
========================================
[W 10:34:37.721] Command:      ExecuteSpatialQuery
[R 10:34:37.721] Long:         1
[W 10:34:37.727] Long:         0
========================================
[W 10:41:17.554] Command:      NextBuffer
[R 10:41:17.554] Long:         1
[W 10:41:17.554] Long:         0
[R 10:41:17.554] Long:         16416
[W 10:41:17.554] Long:         456
[W 10:41:17.554] Short:        -1
[W 10:41:17.554] Long:         0
[W 10:41:17.554] Long:         0
[W 10:41:17.554] Block:
    BufferInfo: [25/16416]  Address@0x26fb0000 
    BufferInHex:    "02008A850100010000000100140000000C0000000100000082..."
[W 10:34:37.710] Command:      QueryWithInfo
[R 10:34:37.710] Long:         1
[R 10:34:37.710] Query Info: 
    Num Columns:   1
    Columns:       "shape"
    SQL_Construct: [1]
    Tables:        "gebase.sde.point"
    WhereClause:   "type_point_id<3"
    Query Type:    4
    Num Hints:     0
    Num Parameter markers: 0
    Logfile:       <null>
[W 10:34:37.718] Long:         0
[W 10:34:37.718] Col_Defines:  [1]
    Name                                 Type    Width nDec  NULL?   RowID
    -------------------------------- ----------- ----- ---- -------- -----
    shape                            SE_SHAPE        0   0      NULL      
    -------------------------------- ----------- ----- ---- -------- -----
[W 10:34:37.718] Long:         71303299
[W 10:34:37.718] Long:         0
[W 10:34:37.718] CoordRef:
    XY False Origin:       -37644800,, -28128500,
    XY System Units:       10000,
    XY Half SysUnit:       0,00005
    XY Round:              0,0001
    XY Cluster Tolerance:  0,001
    Z  Offset:             -100000,000000
    Z  Units:              10000,000000
    Z  Half SysUnit:       0,000050000
    Z  Round:              0,000100000
    Z  Cluster Tolerance:  0,001
    Measure Offset:        -100000,000000
    Measure Units:         10000,000000
    Measure Half SysUnit:  0,000050000
    Measure Round:         0,000100000
    Measure Cluster Tol:   0,001
    Coordinate System ID:  0
    Coordinate System:     "PROJCS["Nord_Maroc_Degree",GEOGCS["GCS_Merchich_Degree",DATUM["D_Merchich",SPHEROID["Clarke_1880_IGN",6378249.2,293.46602]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",300000.0],PARAMETER["Central_Meridian",-5.4],PARAMETER["Standard_Parallel_1",33.3],PARAMETER["Scale_Factor",0.999625769],PARAMETER["Latitude_Of_Origin",33.3],UNIT["Meter",1.0]]"
    Spatial Reference ID:  102191
    Precision              High [64]
========================================
[W 10:34:37.719] Command:      SetSpatialConstraints
[R 10:34:37.719] Long:         1
[R 10:34:37.719] Short:        2
[R 10:34:37.719] Long:         0
[R 10:34:37.720] Filter Array: [1]
    Table:        gebase.sde.point
    Column:       shape
    SearchMethod: SM_ENVP
    Truth:        Must Pass
    FilterType:   SE_SHAPE_FILTER
          FilterShape:
          XY False Origin:       -37644800,, -28128500,
          XY System Units:       10000,
          XY Half SysUnit:       0,00005
          XY Round:              0,0001
          XY Cluster Tolerance:  0,001
          Z  Offset:             -100000,000000
          Z  Units:              10000,000000
          Z  Half SysUnit:       0,000050000
          Z  Round:              0,000100000
          Z  Cluster Tolerance:  0,001
          Measure Offset:        -100000,000000
          Measure Units:         10000,000000
          Measure Half SysUnit:  0,000050000
          Measure Round:         0,000100000
          Measure Cluster Tol:   0,001
          Coordinate System ID:  0
          Coordinate System:     "PROJCS["Nord_Maroc_Degree",GEOGCS["GCS_Merchich_Degree",DATUM["D_Merchich",SPHEROID["Clarke_1880_IGN",6378249.2,293.46602]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",300000.0],PARAMETER["Central_Meridian",-5.4],PARAMETER["Standard_Parallel_1",33.3],PARAMETER["Scale_Factor",0.999625769],PARAMETER["Latitude_Of_Origin",33.3],UNIT["Meter",1.0]]"
          Spatial Reference ID:  102191
          Precision              High [64]
          Feature Number:        0
          Feature Entity Type:   Area        
          Number of Points:      5
          Feature Envelope:
            MinX:    328133,48150, MaxX:    384094,63650
            MinY:    133834,78230, MaxY:    159869,12210
          Polygon Perimeter:        163990,98960
          Polygon Area:          1456911724,87047
---------------------------------------------------------------
Point          X                Y               2D Distance 
---------------------------------------------------------------
    1     328133,48150     133834,78230
    2     384094,63650     133834,78230        55961,155
    3     384094,63650     159869,12210        26034,340
    4     328133,48150     159869,12210        55961,155
    5     328133,48150     133834,78230        26034,340

[W 10:34:37.721] Long:         0
========================================
[W 10:34:37.721] Command:      ExecuteSpatialQuery
[R 10:34:37.721] Long:         1
[W 10:34:37.727] Long:         0
========================================
[W 10:41:17.554] Command:      NextBuffer
[R 10:41:17.554] Long:         1
[W 10:41:17.554] Long:         0
[R 10:41:17.554] Long:         16416
[W 10:41:17.554] Long:         456
[W 10:41:17.554] Short:        -1
[W 10:41:17.554] Long:         0
[W 10:41:17.554] Long:         0
[W 10:41:17.554] Block:
    BufferInfo: [25/16416]  Address@0x26fb0000 
    BufferInHex:    "02008A850100010000000100140000000C0000000100000082..."
added 3456 characters in body
Source Link
geogeek
  • 4.6k
  • 5
  • 36
  • 80

i tried to compress and rebuild indexes in the database using the above scipt but there's no improvements at all.

i tried to view data from ArcMap, i have founded the same problem.

Using the performance monitor i remarked some bottlenecks in CPU and network sides.

SDEINTERCEPT details:

i have tried @travis advice, so i opened mxd referencing data in sde with Arcmap, then i remarked this part take 7 minutes:

import[W arcpy10:34:37.710] ,Command: sys , os   QueryWithInfo
arcpy.env[R 10:34:37.overwriteOutput710] =Long: True        1
[R 10:34:37.710] Query Info: 
    Num Columns:   1
db_name  = sys.argv[1] Columns:       "shape"
    SQL_Construct: [1]
db_path = os.path.join(os  Tables:        "ife_tanant.pathsde.dirname(__file__),borne"
 "Connection_"+db_name+".sde")   WhereClause:   "type_borne_id<3"
arcpy.env.workspace = db_path  Query Type:    4
    Num Hints:     0
    Num Parameter markers: 0
#disconnect all users from theLogfile: database      <null>
[W 10:34:37.718] Long:         0
arcpy[W 10:34:37.DisconnectUser(db_path,718] "ALL")Col_Defines:  [1]
    Name                                 Type    Width nDec  NULL?   RowID
# Get a list of-------------------------------- versions----------- to----- pass---- into-------- the-----
 ReconcileVersions tool  shape                            SE_SHAPE        0   0      NULL      
    -------------------------------- ----------- ----- ---- -------- -----
[W 10:34:37.718] Long:         71303299
versionList[W =10:34:37.718] arcpyLong:         0
[W 10:34:37.ListVersions(db_path)718] CoordRef:
    XY False Origin:       -37644800,, -28128500,
    XY System Units:       10000,
# Execute the ReconcileVersions tool.XY Half SysUnit:       0,00005
arcpy.ReconcileVersions_management(db_path    XY Round:              0,0001
 "ALL_VERSIONS"   XY Cluster Tolerance:  0,001
 "sde.DEFAULT"   Z  Offset:             -100000,000000
 versionList   Z  Units:              10000,000000
 "LOCK_ACQUIRED"   Z  Half SysUnit:       0,000050000
 "NO_ABORT"   Z  Round:              0,000100000
 "BY_OBJECT"   Z  Cluster Tolerance:  0,001
 "FAVOR_TARGET_VERSION"   Measure Offset:        -100000,000000
 "POST"   Measure Units:         10000,000000
 "DELETE_VERSION"   Measure Half SysUnit:  0,000050000
 "c   Measure Round:/reconcilelog.txt")         0,000100000
    Measure Cluster Tol:   0,001
# Run the compress tool.Coordinate System ID:  0
arcpy    Coordinate System:     "PROJCS["Nord_Maroc_Degree",GEOGCS["GCS_Merchich_Degree",DATUM["D_Merchich",SPHEROID["Clarke_1880_IGN",6378249.Compress_management(db_path)2,293.46602]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",300000.0],PARAMETER["Central_Meridian",-5.4],PARAMETER["Standard_Parallel_1",33.3],PARAMETER["Scale_Factor",0.999625769],PARAMETER["Latitude_Of_Origin",33.3],UNIT["Meter",1.0]]"
    Spatial Reference ID:  102191
#Allow the database to beginPrecision accepting connections again           High [64]
arcpy========================================
[W 10:34:37.AcceptConnections(db_path,719] True)Command:      SetSpatialConstraints
[R 10:34:37.719] Long:         1
dataList[R =10:34:37.719] arcpyShort:        2
[R 10:34:37.ListTables()719] +Long: arcpy        0
[R 10:34:37.ListFeatureClasses()720] +Filter arcpyArray: [1]
    Table:        IFE_TANANT.ListRasters()SDE.BORNE
    Column:       shape
# Next   SearchMethod: SM_ENVP
    Truth:        Must Pass
    FilterType:   SE_SHAPE_FILTER
          FilterShape:
          XY False Origin:       -37644800,, for-28128500,
 feature datasets get all of the featureclasses   XY System Units:       10000,
# from the list and add them to the master list.XY Half SysUnit:       0,00005
for dataset in arcpy.ListDatasets()       XY Round:              0,0001
    dataList += arcpy    XY Cluster Tolerance:  0,001
          Z  Offset:             -100000,000000
          Z  Units:              10000,000000
          Z  Half SysUnit:       0,000050000
          Z  Round:              0,000100000
          Z  Cluster Tolerance:  0,001
          Measure Offset:        -100000,000000
          Measure Units:         10000,000000
          Measure Half SysUnit:  0,000050000
          Measure Round:         0,000100000
          Measure Cluster Tol:   0,001
          Coordinate System ID:  0
          Coordinate System:     "PROJCS["Nord_Maroc_Degree",GEOGCS["GCS_Merchich_Degree",DATUM["D_Merchich",SPHEROID["Clarke_1880_IGN",6378249.ListFeatureClasses(feature_dataset=dataset)2,293.46602]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",300000.0],PARAMETER["Central_Meridian",-5.4],PARAMETER["Standard_Parallel_1",33.3],PARAMETER["Scale_Factor",0.999625769],PARAMETER["Latitude_Of_Origin",33.3],UNIT["Meter",1.0]]"
          Spatial Reference ID:  102191
          Precision              High [64]
          Feature Number:        0
##print dataList         Feature Entity Type:   Area        
# pass in the list      Number of datasetsPoints: owned by the admin to the5
 rebuild indexes and analyze datasets tools    Feature Envelope:
# Note           MinX: to use the "SYSTEM"328133,48150, optionMaxX: the user must be384094,63650
 an administrator.          MinY:    133834,78230, MaxY:    159869,12210
arcpy.RebuildIndexes_management(db_path          Polygon Perimeter:        163990,98960
 "SYSTEM"         Polygon Area:          1456911724,87047
---------------------------------------------------------------
Point dataList         X                Y               2D Distance 
---------------------------------------------------------------
    1     328133,48150 "ALL")    133834,78230
    2     384094,63650     133834,78230        55961,155
arcpy.AnalyzeDatasets_management(db_path    3     384094,63650 "SYSTEM"    159869,12210 dataList       26034,340
 "ANALYZE_BASE"   4     328133,48150 "ANALYZE_DELTA"    159869,12210 "ANALYZE_ARCHIVE")       55961,155

i tried to view data from ArcMap, i have founded the same problem.

Using the performance monitor i remarked some bottlenecks in CPU and network sides.

SDEINTERCEPT details:

i have tried @travis advice, so i opened mxd referencing data in sde with Arcmap, then i remarked this part take 7 minutes:

    5     328133,48150     133834,78230        26034,340

[W 10:34:37.721] Long:         0
========================================
[W 10:34:37.721] Command:      ExecuteSpatialQuery
[R 10:34:37.721] Long:         1
[W 10:34:37.727] Long:         0
========================================
[W 10:41:17.554] Command:      NextBuffer
[R 10:41:17.554] Long:         1
[W 10:41:17.554] Long:         0
[R 10:41:17.554] Long:         16416
[W 10:41:17.554] Long:         456
[W 10:41:17.554] Short:        -1
[W 10:41:17.554] Long:         0
[W 10:41:17.554] Long:         0
[W 10:41:17.554] Block:
    BufferInfo: [25/16416]  Address@0x26fb0000 
    BufferInHex:    "02008A850100010000000100140000000C0000000100000082..."

i tried to compress and rebuild indexes in the database using the above scipt but there's no improvements at all.

import arcpy , sys , os
arcpy.env.overwriteOutput = True


db_name  = sys.argv[1]

db_path = os.path.join(os.path.dirname(__file__), "Connection_"+db_name+".sde")
arcpy.env.workspace = db_path

#disconnect all users from the database.
arcpy.DisconnectUser(db_path, "ALL")

# Get a list of versions to pass into the ReconcileVersions tool.
versionList = arcpy.ListVersions(db_path)


# Execute the ReconcileVersions tool.
arcpy.ReconcileVersions_management(db_path, "ALL_VERSIONS", "sde.DEFAULT", versionList, "LOCK_ACQUIRED", "NO_ABORT", "BY_OBJECT", "FAVOR_TARGET_VERSION", "POST", "DELETE_VERSION", "c:/reconcilelog.txt")

# Run the compress tool.
arcpy.Compress_management(db_path)

#Allow the database to begin accepting connections again
arcpy.AcceptConnections(db_path, True)

dataList = arcpy.ListTables() + arcpy.ListFeatureClasses() + arcpy.ListRasters()

# Next, for feature datasets get all of the featureclasses
# from the list and add them to the master list.
for dataset in arcpy.ListDatasets():
    dataList += arcpy.ListFeatureClasses(feature_dataset=dataset)


##print dataList
# pass in the list of datasets owned by the admin to the rebuild indexes and analyze datasets tools
# Note: to use the "SYSTEM" option the user must be an administrator.
arcpy.RebuildIndexes_management(db_path, "SYSTEM", dataList, "ALL")

arcpy.AnalyzeDatasets_management(db_path, "SYSTEM", dataList, "ANALYZE_BASE", "ANALYZE_DELTA", "ANALYZE_ARCHIVE")

i tried to view data from ArcMap, i have founded the same problem.

Using the performance monitor i remarked some bottlenecks in CPU and network sides.

SDEINTERCEPT details:

i have tried @travis advice, so i opened mxd referencing data in sde with Arcmap, then i remarked this part take 7 minutes:

[W 10:34:37.721] Command:      ExecuteSpatialQuery
[R 10:34:37.721] Long:         1
[W 10:34:37.727] Long:         0
========================================
[W 10:41:17.554] Command:      NextBuffer
[R 10:41:17.554] Long:         1
[W 10:41:17.554] Long:         0
[R 10:41:17.554] Long:         16416
[W 10:41:17.554] Long:         456
[W 10:41:17.554] Short:        -1

i tried to compress and rebuild indexes in the database but there's no improvements at all.

i tried to view data from ArcMap, i have founded the same problem.

Using the performance monitor i remarked some bottlenecks in CPU and network sides.

SDEINTERCEPT details:

i have tried @travis advice, so i opened mxd referencing data in sde with Arcmap, then i remarked this part take 7 minutes:

[W 10:34:37.710] Command:      QueryWithInfo
[R 10:34:37.710] Long:         1
[R 10:34:37.710] Query Info: 
    Num Columns:   1
    Columns:       "shape"
    SQL_Construct: [1]
    Tables:        "ife_tanant.sde.borne"
    WhereClause:   "type_borne_id<3"
    Query Type:    4
    Num Hints:     0
    Num Parameter markers: 0
    Logfile:       <null>
[W 10:34:37.718] Long:         0
[W 10:34:37.718] Col_Defines:  [1]
    Name                                 Type    Width nDec  NULL?   RowID
    -------------------------------- ----------- ----- ---- -------- -----
    shape                            SE_SHAPE        0   0      NULL      
    -------------------------------- ----------- ----- ---- -------- -----
[W 10:34:37.718] Long:         71303299
[W 10:34:37.718] Long:         0
[W 10:34:37.718] CoordRef:
    XY False Origin:       -37644800,, -28128500,
    XY System Units:       10000,
    XY Half SysUnit:       0,00005
    XY Round:              0,0001
    XY Cluster Tolerance:  0,001
    Z  Offset:             -100000,000000
    Z  Units:              10000,000000
    Z  Half SysUnit:       0,000050000
    Z  Round:              0,000100000
    Z  Cluster Tolerance:  0,001
    Measure Offset:        -100000,000000
    Measure Units:         10000,000000
    Measure Half SysUnit:  0,000050000
    Measure Round:         0,000100000
    Measure Cluster Tol:   0,001
    Coordinate System ID:  0
    Coordinate System:     "PROJCS["Nord_Maroc_Degree",GEOGCS["GCS_Merchich_Degree",DATUM["D_Merchich",SPHEROID["Clarke_1880_IGN",6378249.2,293.46602]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",300000.0],PARAMETER["Central_Meridian",-5.4],PARAMETER["Standard_Parallel_1",33.3],PARAMETER["Scale_Factor",0.999625769],PARAMETER["Latitude_Of_Origin",33.3],UNIT["Meter",1.0]]"
    Spatial Reference ID:  102191
    Precision              High [64]
========================================
[W 10:34:37.719] Command:      SetSpatialConstraints
[R 10:34:37.719] Long:         1
[R 10:34:37.719] Short:        2
[R 10:34:37.719] Long:         0
[R 10:34:37.720] Filter Array: [1]
    Table:        IFE_TANANT.SDE.BORNE
    Column:       shape
    SearchMethod: SM_ENVP
    Truth:        Must Pass
    FilterType:   SE_SHAPE_FILTER
          FilterShape:
          XY False Origin:       -37644800,, -28128500,
          XY System Units:       10000,
          XY Half SysUnit:       0,00005
          XY Round:              0,0001
          XY Cluster Tolerance:  0,001
          Z  Offset:             -100000,000000
          Z  Units:              10000,000000
          Z  Half SysUnit:       0,000050000
          Z  Round:              0,000100000
          Z  Cluster Tolerance:  0,001
          Measure Offset:        -100000,000000
          Measure Units:         10000,000000
          Measure Half SysUnit:  0,000050000
          Measure Round:         0,000100000
          Measure Cluster Tol:   0,001
          Coordinate System ID:  0
          Coordinate System:     "PROJCS["Nord_Maroc_Degree",GEOGCS["GCS_Merchich_Degree",DATUM["D_Merchich",SPHEROID["Clarke_1880_IGN",6378249.2,293.46602]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",300000.0],PARAMETER["Central_Meridian",-5.4],PARAMETER["Standard_Parallel_1",33.3],PARAMETER["Scale_Factor",0.999625769],PARAMETER["Latitude_Of_Origin",33.3],UNIT["Meter",1.0]]"
          Spatial Reference ID:  102191
          Precision              High [64]
          Feature Number:        0
          Feature Entity Type:   Area        
          Number of Points:      5
          Feature Envelope:
            MinX:    328133,48150, MaxX:    384094,63650
            MinY:    133834,78230, MaxY:    159869,12210
          Polygon Perimeter:        163990,98960
          Polygon Area:          1456911724,87047
---------------------------------------------------------------
Point          X                Y               2D Distance 
---------------------------------------------------------------
    1     328133,48150     133834,78230
    2     384094,63650     133834,78230        55961,155
    3     384094,63650     159869,12210        26034,340
    4     328133,48150     159869,12210        55961,155
    5     328133,48150     133834,78230        26034,340

[W 10:34:37.721] Long:         0
========================================
[W 10:34:37.721] Command:      ExecuteSpatialQuery
[R 10:34:37.721] Long:         1
[W 10:34:37.727] Long:         0
========================================
[W 10:41:17.554] Command:      NextBuffer
[R 10:41:17.554] Long:         1
[W 10:41:17.554] Long:         0
[R 10:41:17.554] Long:         16416
[W 10:41:17.554] Long:         456
[W 10:41:17.554] Short:        -1
[W 10:41:17.554] Long:         0
[W 10:41:17.554] Long:         0
[W 10:41:17.554] Block:
    BufferInfo: [25/16416]  Address@0x26fb0000 
    BufferInHex:    "02008A850100010000000100140000000C0000000100000082..."
added 659 characters in body
Source Link
geogeek
  • 4.6k
  • 5
  • 36
  • 80

SDEINTERCEPT details:

i have tried @travis advice, so i opened mxd referencing data in sde with Arcmap, then i remarked this part take 7 minutes:

[W 10:34:37.721] Command:      ExecuteSpatialQuery
[R 10:34:37.721] Long:         1
[W 10:34:37.727] Long:         0
========================================
[W 10:41:17.554] Command:      NextBuffer
[R 10:41:17.554] Long:         1
[W 10:41:17.554] Long:         0
[R 10:41:17.554] Long:         16416
[W 10:41:17.554] Long:         456
[W 10:41:17.554] Short:        -1

what could make ExecuteSpatialQuery so slow to take 7 minutes ?

I'm available for explanations of the problem.

I'm available for explanations of the problem.

SDEINTERCEPT details:

i have tried @travis advice, so i opened mxd referencing data in sde with Arcmap, then i remarked this part take 7 minutes:

[W 10:34:37.721] Command:      ExecuteSpatialQuery
[R 10:34:37.721] Long:         1
[W 10:34:37.727] Long:         0
========================================
[W 10:41:17.554] Command:      NextBuffer
[R 10:41:17.554] Long:         1
[W 10:41:17.554] Long:         0
[R 10:41:17.554] Long:         16416
[W 10:41:17.554] Long:         456
[W 10:41:17.554] Short:        -1

what could make ExecuteSpatialQuery so slow to take 7 minutes ?

I'm available for explanations of the problem.

added 85 characters in body
Source Link
geogeek
  • 4.6k
  • 5
  • 36
  • 80
Loading
added 4 characters in body
Source Link
geogeek
  • 4.6k
  • 5
  • 36
  • 80
Loading
Tweeted twitter.com/#!/StackGIS/status/344426546880204800
edited title
Source Link
geogeek
  • 4.6k
  • 5
  • 36
  • 80
Loading
edited title
Link
geogeek
  • 4.6k
  • 5
  • 36
  • 80
Loading
Notice added Draw attention by geogeek
Bounty Started worth 50 reputation by geogeek
added 150 characters in body
Source Link
geogeek
  • 4.6k
  • 5
  • 36
  • 80
Loading
deleted 414 characters in body
Source Link
geogeek
  • 4.6k
  • 5
  • 36
  • 80
Loading
edited tags
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345
Loading
added 764 characters in body
Source Link
geogeek
  • 4.6k
  • 5
  • 36
  • 80
Loading
edited tags
Link
geogeek
  • 4.6k
  • 5
  • 36
  • 80
Loading
Source Link
geogeek
  • 4.6k
  • 5
  • 36
  • 80
Loading