Oracle Spatial create spatial field index create field index complete SQL statement instance

Source: Internet
Author: User

// Create a spatial field index for Oracle Spatial table
// ================================================
Drop index index_sp_v_gbjj;
Drop index index_sp_v_xzq;
Drop index index_sp_v_ytfq;
Drop index index_sp_v_dltb;
Drop index index_sp_v_nydfddj;

Create index index_sp_v_gbjj on v_gb_gdbhdk_h (geometry) indextype is MDSYS. spatial_index;
Create index index_sp_v_xzq on v_jj_xzq_h (geometry) indextype is MDSYS. spatial_index;
Create index index_sp_v_ytfq on v_tdlygh_ytfq_xz_e (geometry) indextype is MDSYS. spatial_index;
Create index index_sp_v_dltb on v_tdlyxz_dltb_h (geometry) indextype is MDSYS. spatial_index;
Create index index_sp_v_nydfddj on v_tdly_nydfddj_k (geometry) indextype is MDSYS. spatial_index;
// ================================================

// Create a field Index
// ================================================ =
Drop index index_fd_v_gbjj_xzqdm;
Drop index index_fd_v_xzq_xzqdm;
Drop index index_fd_v_ytfq_xzqdm;
Drop index index_fd_v_dltb_zldwdm;
Drop index index_fd_v_nydfddj_xzdm;

Create index index_fd_v_gbjj_xzqdm on v_gb_gdbhdk_h (xzqdm );
Create index index_fd_v_xzq_xzqdm on v_jj_xzq_h (xzqdm );
Create index index_fd_v_ytfq_xzqdm on v_tdlygh_ytfq_xz_e (xzqdm );
Create index index_fd_v_dltb_zldwdm on v_tdlyxz_dltb_h (zldwdm );
Create index index_fd_v_nydfddj_xzdm on v_tdly_nydfddj_k (xzdm );
// ================================================ =
// Create a FID field uniqueness Constraint
Alter table v_gb_gdbhdk_h drop constraint index_uk_v_gbjj_fid cascade;
Alter table v_gb_gdbhdk_h add constraint index_uk_v_gbjj_fid unique (FID );

Alter table v_jj_xzq_h drop constraint index_uk_v_xzq_fid cascade;
Alter table v_jj_xzq_h add constraint index_uk_v_xzq_fid unique (FID );

Alter table v_tdlygh_ytfq_xz_e drop constraint index_uk_v_ytfq_fid cascade;
Alter table v_tdlygh_ytfq_xz_e add constraint index_uk_v_ytfq_fid unique (FID );

Alter table v_tdlyxz_dltb_h drop constraint index_uk_v_dltb_fid cascade;
Alter table v_tdlyxz_dltb_h add constraint index_uk_v_dltb_fid unique (FID );

Alter table v_tdly_nydfddj_k drop constraint index_uk_v_nydfddj_fid cascade;
Alter table v_tdly_nydfddj_k add constraint index_uk_v_nydfddj_fid unique (FID );

// ================================================ =

-- The -- end --

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.