Search code examples
t-sqlsybasedbvisualizer

Insertion Of data into temp table


I am using sybase database and i use DB visulazier, I have two tables one of the table has 30 million and other table has 3 million which has archive data of the first table. Both the tables grow by date, i mean every day we get records into the table. I am creating a temp table and inserting both the tables into the temp tables and the insertion takes a lot of time so times it blows off the software.

i get errors: alter table size or remove temp tables from sys logs.

can i get any help how to improve the performance.???


Solution

  • well, temprory tables shouldn't be used for inserting millions of data. it would fill tempdb.

    to avoid logs filling, insert data in small batches, may be 1000-10000 rows at a time.

    curious to know why are adding this much records in temp table ?