Showing results for 
Search instead for 
Did you mean: 

question about tempdb and cache

Former Member
0 Kudos

I have a scenario like:

1. RAMDISK setup on Linux as 2G

2. two files created on this ramdisk for tempdb data and log. data is 1.5G, log is 0.5G

    physical device 1.5G created on data file

    physical device 0.5G created on log file

3. 2 named caches created for tempdb data and log with same size.say tempdb data cache is 1.5G, tempdb log cache is 0.5G

I have a operation need to generate 3G data with very bad performance.

I want to this operation can be done in tempdb before written to disk for performance. So I will create a table in tempdb and generate all data in this table. When it's done, write to disk with one insert sql statement.

I have enough memory 3G available. then how to use this 3G for this case?

Increase tempdb data cache and tempdb log cache to 3G? if so, any IO before the data written to disk from table in tempdb?

what's the best solution for this case for performance?

Accepted Solutions (0)

Answers (1)

Answers (1)

Active Contributor
0 Kudos

I'm assuming this is still on 12.5.x.  In 15.0.2 and higher, the ramdisk would be better used for a non-tempdb device as new features in ASE greatly reduce the amount of i/o done to tempdb as long as tempdb pages don't need to be flushed from cache.

You aren't going to be able to create 3gb of data in a tempdb with a 1.5 GB data segment.

It won't help to have a dedicated tempdb named cache that is larger than tempdb.

If your tempdb is larger than 2gb, it is just that only some of it is on the ramdisk and some is on slower disks, I think you might be better off using the ramdisk entirely for tempdb log.

Particularly if the data generation isn't all one big transaction, but a number of smaller ones

that can get truncated along the way.