Michael Mattox wrote:

I just set it to 2.5. What kind of benchmark can I run?

I'm probably getting artificial results, but I recently just did in psql:

CREATE VIEW foo AS {complex_slow_query};

SET random_page_cost = 1.5; EXPLAIN ANALYZE SELECT * FROM foo;

Note the time taken. Repeat a few times to get the average.

Bump random_page_cost up in increments of 0.5, repeat.


The random_page_cost with the best times would be the one to use. Try it on several other queries to confirm it.


AFAIK, using SET random_page_cost would only set the cost for THAT backend that you're using, and after correcting postgresql.conf, run pg_ctl reload.

--
Linux homer 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux
9:30am up 189 days, 35 min, 5 users, load average: 5.01, 5.03, 5.00

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to