To fix this issue The Test database indexes properties include IOT_REDUNDANT_PKEY_ELIM and DROPPED columns but not the production indexes. These columns were added in oracle 10g. Is perhaps the production database running under the old 9i version and the test database under 10g ? If so, I'd consider that a more significant difference than anything else.
like below fixes the issue Because of the limitations we have in Amazon Redhshift SQL (which is based on PostgreSQL 8.0.2). I am forced to execute the following query for some other complex query purposes: , How about this way using generate_series() without using 200 unions?
CREATE TEMP TABLE NS AS SELECT * FROM generate_series(1, 200)