Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- cr_spatial_index.sql
- --
- -- Note: if geometries do not span more than 1 row, you can remove
- -- the DISTINCT qualifier from the SELECT statement
- --
- DECLARE
- CURSOR c1 IS SELECT DISTINCT sdo_gid FROM POLYGON_SDOGEOM;
- gid NUMBER;
- i NUMBER;
- BEGIN
- i := 0;
- FOR r IN c1 LOOP
- BEGIN
- gid:= r.sdo_gid;
- sdo_admin.update_index_fixed('POLYGON', gid, 15, FALSE, FALSE, FALSE);
- EXCEPTION WHEN OTHERS THEN
- DBMS_OUTPUT.put_line('error for gid'||TO_CHAR(gid)||': '||SQLERRM );
- END;
- i:= i + 1;
- IF i = 50 THEN
- COMMIT;
- i:= 0;
- END IF;
- END LOOP;
- COMMIT;
- END;
- /
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement