[ADMIN] about shared_buffer and kernel.shmmax

2012-06-20 Thread wangqi
Hi everybody, shared_buffer maximum limit is ? I set shared_buffer more than 250G, I got error at startup pg. This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parame

[ADMIN] a very slow SQL

2012-06-24 Thread wangqi
Hi everybody, An SQL execution is very slow. What can I do to makes it faster。 count_MCL 3476534 count_MLC 34442313 count_HLCC - 245119339

[ADMIN] about select use random

2012-07-24 Thread wangqi
Hi everyone ■SQL-1 CREATE TABLE wk_mclid1( id1 integer , PRIMARY KEY(id1) ); ■SQL-2 INSERT INTO wk_mclid1(id1) VALUES(1),(2),(3),(4),(5),(6),(7),(8),(9),(10) GO ■SQL-3 select * from wk_mclid1 where id1= (round((random() * (10-1))::integer) + 1)::integer; When we excute SQL-3,sometimes the res

Re: [ADMIN] about select use random

2012-07-24 Thread wangqi
Thanks Tom, I try it. 于 2012-7-25 10:55, Tom Lane 写道: > wangqi writes: >> ■SQL-3 >> select * from wk_mclid1 where id1= (round((random() * (10-1))::integer) >> + 1)::integer; >> When we excute SQL-3,sometimes the result was 0 record or more than 1 >> record. &

Re: [ADMIN] about select use random

2012-07-24 Thread wangqi
Hi Tom If you don't want that, you can use a WITH to lock down the result of a single random() call. How should I do it? 于 2012-7-25 10:55, Tom Lane 写道: > wangqi writes: >> ■SQL-3 >> select * from wk_mclid1 where id1= (round((random() * (10-1))::integer) >> + 1)::

[ADMIN] about postgresql process

2013-03-25 Thread wangqi
Hi everybody What's this in command 'ps ux'. If these processes appears The Server load average: 100.99, 100.74, 86.85. How can I reslove it. - postgres 35044 34.2 0.0 0 0 ? Rs 00:19 50:42 [postmaster] post