Ismail Kizir wrote:
> Gaetano,
>
> I've changed my settings as :
>
> #fsync = true # turns forced synchronization on or off
> #wal_sync_method = fsync # the default varies across platforms:
> #effective_cache_size = 1000 # typically 8KB each
> random_page_cost = 2 # units are one sequential page fetch cost
> cpu_tuple_cost = 0.009 # (same)
> cpu_index_tuple_cost = 0.0009 # (same)
> cpu_operator_cost = 0.0025 # (same)
> # fsync, fdatasync, open_sync, or
> open_datasync
> #wal_buffers = 8 # min 4, 8KB each
>
> But it still doesn't optimize for that range.
> Finally, i've set seq_scan off and, it works now.
> But i think, there must be a way to handle those settings automatically for
> cpu, ram and hdd settings(is it a sweet dream??)
Did you SIGHUP the postmaster after ?
You can change these settings also from command line, what you have to
do is decrease the cost of the index scan till is less of the sequential
scan cost.
Good luck.
Regards
Gaetano Mendola