2

I am experimenting with running PostgreSQL on a ramdisk on windows. The way I did it was to simply place the data directory on the ramdisk.

Without having done any specific benchmarks, the performance seems to be magnificent and only CPU bound. My question is what the optimal values for things like work_mem, shared_buffers etc. would be?

Even when the database is in ram it take more than half a minute to run many of my queries. Therefore, I wonder whether it makes sence to create indexes on the table. The indexes would, of course, need to stay in ram. I should mention that I am using PostgreSQL for a data warehouse (small one, though).

Edit: I should mention that I am using the RamDisk utility from DataRam.com. It only gives me a bluescreen once in a while, when I configure the ramdisk, never when it is established. I think of this as nostalgic eyecandy. ;)

4

2 回答 2

1

我肯定会创建索引。引擎可以使用包含的信息进行各种优化,它应该会大大提高你的性能。RamDisk 解决了最坏的表扫描类型的情况,但这并不一定意味着该表扫描比进行正确查找要快。

于 2011-02-07T23:49:35.133 回答
1

是的,使用索引,但 work_mem 仍然取决于机器本身的大小。当然,您想要高 work_mem 的原因之一是您不必敲击磁盘来进行磁带排序。在 ramdisk 上,这几乎没有那么危险。请记住,您在 ram 磁盘上没有数据完整性。

于 2011-02-08T06:39:05.347 回答