Skip to main content
Question

SQL - Index columns

  • July 28, 2016
  • 3 replies
  • 103 views

Forum|alt.badge.img
Hello,

I'm using a workbench with a workspace runner. The workspace translates files into MS SQL tables. I would like to index some of the columns once all the files have been processed.

Can you please help?

Thanks, Moni

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • July 28, 2016

You can use the SQLExecutor to create the indexes, e.g.:

CREATE INDEX index_name ON table_name (column_name)

If you want to make sure the SQLExecutor is executed last, use e.g. a FeatureHolder and then a Sampler (1st feature) before the SQLExecutor.

You could also put the SQLExecutor into a child workspace and have it called with another WorkspaceRunner from the master workspace.


ciarab
Contributor
Forum|alt.badge.img+9
  • Contributor
  • July 29, 2016

@honkovam I second what david_r suggested to create the index like eg

CREATE INDEX index_name ON table_name (column_name)

but I usually put it into the navigator panel in the SQL Statement to execute after translation parameter if you wanted to cut down on having workspace runners


itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • July 30, 2016

Or just use the FeatureWriter, that is if you are using FME 2016, and after it the SQLExecutor