Skip to main content
Question

SQL - Index columns


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

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+17
  • Supporter
  • July 30, 2016

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings