postgresql - MySQL -> Postgres -
using db designer , exporting sql got part of following file. it's in mysql format, need in postgres. trimmed first 3 lines work i'm struggling last 2 (the index lines).
create table applications_interfaces ( swe_applications_id integer not null, ieo_applications_id integer not null, primary key(swe_applications_id, ieo_applications_id), index swe_applications_has_ieo_applications_fkindex1(swe_applications_id), index swe_applications_has_ieo_applications_fkindex2(ieo_applications_id) );
my question functionality 2 lines providing, , how rewritten work in postgres?
turn code in this:
create table applications_interfaces ( swe_applications_id integer not null, ieo_applications_id integer not null, primary key(swe_applications_id, ieo_applications_id) ); create index applications_interfaces_fkindex1 on applications_interfaces using btree (swe_applications_id); create index applications_interfaces_fkindex2 on applications_interfaces using btree (ieo_applications_id);
indexes created after table. see syntax of create index: http://www.postgresql.org/docs/9.4/static/sql-createindex.html
i suggest study why need these indexes. built or generated tools?
swe_applications_id indexed primary key, don't need first index if don't have specific need.
Comments
Post a Comment