在我们遇到很多有关于性能的问题,我们一般建议用户重新常见空间索引,那么如果用户一个库里面有几十个甚至上百个空间索引,那么该怎么处理呢? ArcGIS10.1版本 RebuildIndexes:(这个功能只有ArcGIS10.1才有的) 这个功能主要是对用户进行大范围数据编辑,
在我们遇到很多有关于性能的问题,我们一般建议用户重新常见空间索引,那么如果用户一个库里面有几十个甚至上百个空间索引,那么该怎么处理呢?
ArcGIS10.1版本
RebuildIndexes:(这个功能只有ArcGIS10.1才有的)
这个功能主要是对用户进行大范围数据编辑,在原有数据基础上做大量的数据加载或者数据删除后,为了提高数据性能,进行的操作。其实听到这里有点老生常谈,我们原来的方法也是一个图层一个图层的进行重建索引,但是这个功能可以批量的重建索引,而且及支持属性索引也支持空间索引,支持系统表以及版本的增量表的重建索引,比较方便。
ArcGIS10之前的版本
但是对ArcGIS10以及之前的版本并没有批量重建索引的办法,我们只能另辟蹊径了。
1:使用sde命令行的方法
我们可以使用sde命令,load_only_io和normal_io进行切换来进行空间索引的重建,具体请看帮助。
Switch between load only and normal I/O modes. To modify a feature class's input/output mode, use the load_only_io and normal_io operations. You must be the owner of the feature class to change it from normal I/O to load-only I/O mode. It is recommended that you do not place a versioned feature class that uses binary storage in load only I/O mode because, when you switch back to normal I/O mode, the spatial index will be calculated on a versioned representation of the features. This representation may not match what is stored in the nonversioned f table to which the index gets applied. If this is the case, an error is returned. When the sdelayer command is used to create a layer (i.e., if the register or add operations are used), the resultant feature class is automatically in normal I/O mode. The load-only I/O mode is provided to make bulk data loading processes more efficient. Use load-only mode when performing large inserts to avoid the continuous update of the feature class's indexes. For feature classes that use a spatial grid index (SDEBINARY, SDELOB, WKB_GEOMETRY, or feature classes in DB2), if the grid fields are updated while the feature class is in load-only I/O mode, the spatial index is rebuilt with the new grid sizes when you reset the feature class to normal I/O mode. While rebuilding the spatial index table, the feature class is inaccessible to other users. Note: You can change the grid sizes while the feature class is in normal or load-only I/O mode. If you reset spatial indexes while the feature class is in normal I/O mode, the indexes on the spatial index table are dropped while the spatial index is being re-created.. When the feature class is in normal I/O mode, the envelope is automatically updated whenever a feature that extends the current envelope is added. The envelope is not updated while the feature class is in load-only I/O mode but is recalculated to the full extent when the feature class is reset to normal I/O mode. These examples show the parcels feature class being moved into load only mode then back to normal I/O mode. sdelayer -o load_only_io -l victoria,parcels -u av -p mo -i esri_40 sdelayer -o normal_io -l victoria,parcels -u av -p mo -i esri_40 When the feature class is returned to normal I/O mode, the spatial index table and database indexes are rebuilt. If the operation does not complete successfully for any reason, the feature class is left in load-only I/O mode. When a feature class is in load-only I/O mode, the unique index is removed from the feature class's spatial column. When the index is absent, it is possible to enter nonunique values into the spatial column with an application not created with the ArcSDE C- or Java application programming interface (API). Therefore, no applications besides ArcSDE or applications created with the ArcSDE C- or Java API should ever update the spatial column. Database administrators should be aware of the increased vulnerability of the spatial column when the feature class is in load-only I/O mode.我知道很多朋友肯定没有认真看上面的英文解释,但是没有关系,大家只需要知道,如果我们使用load_only_io模式,就是删除空间索引,我们使用normal_io模式就是创建空间索引就可以了。
那么知道了这两个模式,我们在对该模式做一个延伸介绍
注意:一般情况下,如果我们业务有变更的情况,比如我们插入一条记录,如果是使用ArcGIS客户端或者相关API进行操作,除了我们新添加一条记录外,我们还同步的对空间索引进行更新,但是如果我们业务上有批量更新的情况,那么我们除了变更数据表,而且我们还要同步的批量变更空间索引信息,这样对性能会有一些影响。那么我们就可以在批量变更之前,将数据切换到load_only_io模式,然后进行批量变更,等变更业务彻底完成之后,再切换到normal_io模式,以达到重建索引的目的。
那么对数据量比较多的要素类,我们可以使用sde命令编写批处理文件来对数据进行批量创建空间索引
@echo OFF pause "按任意键开始" sdelayer -o load_only_io -l quxian,shape -i 5151 -s 192.168.220.165 -u sde -p sde echo "图层quxian已经删除了空间索引" sdelayer -o normal_io -l quxian,shape -i 5151 -s 192.168.220.165 -u sde -p sde echo "图层quxian已经创建了空间索引" ... sdelayer -o load_only_io -l quxian1,shape -i 5151 -s 192.168.220.165 -u sde -p sde echo "图层quxian1已经删除了空间索引" sdelayer -o normal_io -l quxian1,shape -i 5151 -s 192.168.220.165 -u sde -p sde echo "图层quxian1已经创建了空间索引" pause "按任意键结束"将以上数据保存为.bat文件,用的时候直接运行即可。
2:使用python脚本重建索引
如果大家留心会发现一个问题,虽然上面使用sde命令可以对要素类进行批量重建索引,但是它仍然需要用户指定特定的要素类名称,那么如果及时个甚至上百个要素类,对用户来说仍然是一个梦魇,那么我们使用python脚本就可以很轻松的实现这个功能。
我们使用Python脚本可以对某个SDE连接下的数据集或者要素类进行遍历,然后对遍历的要素类使用GP工具,该GP工具可以删除和重建空间索引,就是这么简单
from arcpy import * env.workspace=r'Database Connections\Connection to 192.168.100.111.sde' for dataset in ListDatasets(): for fc in ListFeatureClasses("","ALL",dataset): RemoveSpatialIndex_management(fc) AddSpatialIndex_management(fc)执行过程中,我们可以看到右边的信息框的执行过程。
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------

技嘉的主板怎么设置键盘开机首先,要支持键盘开机,一定是PS2键盘!!设置步骤如下:第一步:开机按Del或者F2进入bios,到bios的Advanced(高级)模式普通主板默认进入主板的EZ(简易)模式,需要按F7切换到高级模式,ROG系列主板默认进入bios的高级模式(我们用简体中文来示范)第二步:选择到——【高级】——【高级电源管理(APM)】第三步:找到选项【由PS2键盘唤醒】第四步:这个选项默认是Disabled(关闭)的,下拉之后可以看到三种不同的设置选择,分别是按【空格键】开机、按组

神舟炫龙m7独显直连怎么开要开启神舟炫龙m7的独立显卡直连功能,您可以按照以下步骤进行操作:1.首先,确保您已经安装好了独立显卡的驱动程序。您可以前往神舟官方网站或独立显卡厂商官网下载并安装适合您显卡型号的最新驱动程序。2.在电脑桌面上,右键单击空白处,在弹出的菜单中选择“NVIDIA控制面板”(如果是AMD显卡,则选择“AMDRadeon设置”)。3.在控制面板中,找到“3D设置”或类似命名的选项,点击进入。4.在“3D设置”中,您需要找到“全局设置”或类似命名的选项。在这里,您可以指定使用独

耐克作为全球知名的运动品牌,其鞋子备受瞩目。然而,市场上也存在大量的假冒伪劣商品,其中就包括假冒的耐克鞋盒。辨别真假鞋盒对于保护消费者的权益至关重要。本文将为您提供一些简单而有效的方法,以帮助您辨别真假鞋盒。一:外包装标题通过观察耐克鞋盒的外包装,可以发现许多细微的差异。真正的耐克鞋盒通常具有高品质的纸质材料,手感光滑,且没有明显的刺激性气味。正品鞋盒上的字体和标志通常清晰、精细,并且没有模糊或颜色不协调的情况。二:LOGO烫金标题耐克鞋盒上的LOGO通常是烫金工艺,真品鞋盒上的烫金部分会呈现出

Win11怎么退版本?很多朋友在升级了win11后认为其不好用,那么大家可以选择退回之前的版本哦。那么你知道该如何操作嘛?很多用户都不知道,其实方法并不难,下面小编给大家带来退回Win10的方法分享,一起来学习吧。退回Win10的方法分享1、进入“设置”。2、选择“WindowsUpdate”,然后点击“恢复”。3、在“恢复选项”中选择“以前版本的Windows”,点击“返回”。4、选择原因,然后点击“下一步”。5、你将看到“检查更新”的通知,选择“不,谢谢”。6、阅读需要了解的内容,然后点击“

拯救者y7000p玩cf分辨率多少拯救者Y7000P玩CF的分辨率为1920*1080。因为该电脑配备了GTX1650显卡和i5-9300H处理器,性能较为优秀,足以满足CF这类游戏的需求。同时,1920*1080是目前主流电竞显示器的分辨率,画质清晰度足够。另外,如果有更高要求的玩家,可以适当降低游戏画质的设置,以获得更加流畅的游戏体验。为了享受更清晰的视觉体验,你可以将拯救者y7000p的分辨率调整为2560*1400。这样,你将能够享受到更高质量的图像显示。拯救者Y7000P2022款搭载

数据库系统由4个部分构成:1、数据库,是指长期存储在计算机内的,有组织,可共享的数据的集合;2、硬件,是指构成计算机系统的各种物理设备,包括存储所需的外部设备;3、软件,包括操作系统、数据库管理系统及应用程序;4、人员,包括系统分析员和数据库设计人员、应用程序员(负责编写使用数据库的应用程序)、最终用户(利用接口或查询语言访问数据库)、数据库管理员(负责数据库的总体信息控制)。

mysql查询为什么会慢,关于这个问题,在实际开发经常会遇到,而面试中,也是个高频题。遇到这种问题,我们一般也会想到是因为索引。那除开索引之外,还有哪些因素会导致数据库查询变慢呢?

电脑100兆网口怎么变成千兆的要将电脑的100兆网口升级为千兆网口,一般需要按照以下步骤进行操作:1.确认网卡是否支持千兆网速:首先需要确认电脑上的网卡是否支持千兆以太网,如果不支持的话就无法实现将100兆网口提速至千兆。2.更换网线:要实现千兆网速,需要使用Cat5e或更高规格的网线,因为Cat5e网线可以支持千兆以太网,而对于100兆以太网来说则只需使用Cat5网线即可。3.更改网卡驱动程序:如果您的网卡支持千兆以太网,则需要更新网卡的驱动程序。可以前往网卡制造商的官方网站,下载并安装最新的


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

MinGW - 适用于 Windows 的极简 GNU
这个项目正在迁移到osdn.net/projects/mingw的过程中,你可以继续在那里关注我们。MinGW:GNU编译器集合(GCC)的本地Windows移植版本,可自由分发的导入库和用于构建本地Windows应用程序的头文件;包括对MSVC运行时的扩展,以支持C99功能。MinGW的所有软件都可以在64位Windows平台上运行。

SublimeText3 英文版
推荐:为Win版本,支持代码提示!

EditPlus 中文破解版
体积小,语法高亮,不支持代码提示功能

VSCode Windows 64位 下载
微软推出的免费、功能强大的一款IDE编辑器

ZendStudio 13.5.1 Mac
功能强大的PHP集成开发环境