What is {Oracle}... {Oracle Off}?
I guess these {...} get replaced somewhere in the code with something that makes sense.

This is indeed an old script because compute statistics is not quite state of the art anymore.

Go ahead and create the index with the sql you just posted:

create index x on y(gid) tablespace IDX_TS;


And then analyze the table with dbms_stats:

begin
  DBMS_STATS.GATHER_TABLE_STATS(
       ownname          =&gt; '&lt;owner of the table&gt;'
      ,tabname          =&gt; 'Y'
      ,estimate_percent =&gt; DBMS_STATS.AUTO_SAMPLE_SIZE
      ,method_opt       =&gt; 'FOR ALL COLUMN SIZE AUTO'
      ,granularity      =&gt; 'AUTO'
      ,cascade          =&gt; TRUE
    );
end;
/


EDIT: "cascade => TRUE" will analyze indexes of the table as well.