java - PostgreSQL JDBC - can drop but not recreate indexes -
I am looking for an answer, but there is no luck yet ...
I want to I am postgrassacl guide: Reading '13 .4 demographic database ', it suggests removal of index and foreign key barriers to speed up coop operations.
I am attempting to complete bulk operations on a database, using JDBC statements, I know that I can leave the index without any issues, but the database's After the apprehension, there is a problem of reproducing them. I think I am making a 'syntax error' with 'or' in the name of the index I am making:
statement stmt = connection.createStatement (); String Query = "Create unique index type_uk on cell (field 1, field 2, field 3, field 4) WHERE field 3 and field 4 is not NULL TABLESPACE lcindex"; Stmt.executeUpdate (query); Connection.commit ();
If I execute this query in psql, then it successfully indexes, so I'm a bit confused ...
Any help, insights, Suggestions, etc would be greatly appreciated :) Thanks in advance.
Nickelus did not comment on answers like Michal, but your SQL statement is illegal in postgres And can not work My guess:
Create unique index type_uk on cell (field 1, field 2, field 3, field 4) Tablespace lcdx where field 3 is not empty and field 4 is not empty; div>
Comments
Post a Comment