`Insert Into` times out

:question:QUESTION:
I have data already present in a collection, if I tried to run the following query on complete collection:

INSERT INTO select from

I get the error:

“Error [Query]

Query timed out. The resources allocated for your Virtual Instance are not sufficient to run this query. Please upgrade to a larger Virtual Instance or contact Rockset customer support for assistance constructing a more efficient query. **‘** **’**

Do we need a bigger instance to get this working ?

:white_check_mark:ANSWER

Rockset does have a 2 minute query timeout and this can affect INSERT ... SELECT queries as they are often very scanned heavy.

You could do a couple of things:

  • Temporarily increase your VI size, do the insert to copy the collection, and then scale back down.

  • Add a WHERE clause to filter a subset of records to copy.

  • Another ingestion from the source file into a new collection.