This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
on 03-06-201712:06 PM - edited on 03-11-201909:19 AM by SydneyF
How do I create an index on a field in my database table?
An index for a field can be created using the Post Create SQL Statement option (option #10) found in the Configuration window of the Input tool.
The following example applies to MS SQL Server only and creates an index for the column "City" in the table co_store_file_north.
Important: You must use the SQL code that is appropriate for your database. For instance, the example shown below will not work for Oracle.
Add an Input tool to a blank canvas - this is the only tool needed.
In the Input tool, add the appropriate SQL statement to the Post SQL Statement option in the Configuration window:
CREATE INDEX index_city ON co_store_file_north (City)
Run the workflow.
Check your database to make sure the index was created.
Keep in mind that both the Pre and Post Create SQL Statement options are only available for specific connection types. Per the Help section, only the following connection types are supported: .mdb, .mdb*, .oci, .accdb, ODBC, OLEDB.