Error in Table Creation

2020-06-25 Thread Rajnish Vishwakarma
I am creating dynamically table in PostgreSQL using psycopg2 by passing the
below 2 strings as column names:

'BAF7_X_X_During_soaking-__Temperature__difference_coil_to_coil_with_metal_temp_TC_load_in_PA_load'

and

'BAF7_X_X_During_soaking-__Temperature__difference_coil_to_coil_with_metal_temp_TC_load__in_TA_load'

And the above column names are not same ( both are different columns ) and
both the columns has string same till
*'BAF7_X_X_During_soaking-__Temperature__difference_coil_to_coil_with_metal_temp_TC_load__
.*

but i am getting errors as

Error:
Traceback (most recent call last):
  File 
"C:/Users/Administrator/PycharmProjects/untitled/table_creation_with_HDA_Data.py",
line 131, in 
cursor.execute(sqlCreateTable)
psycopg2.errors.DuplicateColumn: column
"BAF7_X_X_During_soaking-__Temperature__difference_coil_to_coil_"
specified more than once

The above columns are of type TEXT ...also it may be Numeric Type in future.

Require assistance from Postgres team on the above error.

Thanks
Rajnish Vishwakarma


Regarding Postgres - Insertion Time Getting Increased As Data Volume is getting increased

2021-02-10 Thread Rajnish Vishwakarma
Hi Postgres Team,

The below are the scenarios which we are dealing with.

1) There are 20 Tables - On an average each having 150 columns.

2) There are 20 Threads Handled by Thread Pool Executor ( here we are using
Python's - psycopg2 module / library to  fetch the data .)

3) I am using the below statement to insert the data using Python -
psycopg2 module - using the exceute(...) command as .

sql_stmt = "INSERT INTO " + name_Table + final_col_string + "VALUES" +
str(tuple(array_of_curly_values))
print('Sql statement', sql_stmt)col_cursor_db = db_conn.cursor()
v = col_cursor_db.execute(sql_stmt);

But earlier the same 22 threads were running and the insertion time was
gradually increased from 1 second to 30-35 seconds.

Requesting and urging the postgres general support team to help me out on
this.

How can i increase the INSERTION speed to minimize the insertion time taken
by each thread in the THREAD POOL.

Or there any different python libraries other than psycopg2 ?

Is there any different functions in python psycopg2 ?

Or what performance tuning has to be done to increaser the insertion speed ?