[PERFORM] select max/count(id) not using index

2003-12-22 Thread Ryszard Lach
Hi. I have a table with 24k records and btree index on column 'id'. Is this normal, that 'select max(id)' or 'select count(id)' causes a sequential scan? It takes over 24 seconds (on a pretty fast machine): = explain ANALYZE select max(id) from ogloszenia; QUERY PLAN

Re: [PERFORM] duration logging setting in 7.4

2003-11-24 Thread Ryszard Lach
Hi, again. I've turned on only log_connections and log_statement. See the following log fragment (I've included lines only related to opening of new connection); Nov 21 11:06:44 postgres[3359]: [3-1] LOG: connection received: host= port= Nov 21 11:06:44 postgres[3359]: [4-1] LOG: connection

Re: [PERFORM] duration logging setting in 7.4

2003-11-21 Thread Ryszard Lach
On Thu, Nov 20, 2003 at 07:17:01PM -0500, Tom Lane wrote: Is it possible that you're sending a lot of queries that have an initial newline in the text? I'd expect the first line of log output for such a query to look as above. I don't think so, but it is possible, that queries have e.g.

Re: [PERFORM] duration logging setting in 7.4

2003-11-19 Thread Ryszard Lach
On Tue, Nov 18, 2003 at 10:07:48AM -0500, Bruce Momjian wrote: Wow, that is strange. If you don't use syslog, do you see the proper output? I've just checked this. It behaves exactly the same way. If you turn on log_statement, do you see the statements? If I turn on

Re: [PERFORM] duration logging setting in 7.4

2003-11-19 Thread Ryszard Lach
On Wed, Nov 19, 2003 at 01:58:27PM -0500, Bruce Momjian wrote: Ryszard Lach wrote: There is another one thing: logs from the same database running on 7.3 and the same application contained lines like 'select getdatabaseencoding()', 'select datestyle()' and similar (not used by application

Re: [PERFORM] duration logging setting in 7.4

2003-11-18 Thread Ryszard Lach
On Mon, Nov 17, 2003 at 09:37:07PM -0500, Bruce Momjian wrote: Ryszard Lach wrote: Hi. I'm trying to set run-time environment in pgsql7.4 so, that it prints all statements with duration time, but I can't understand why setting log_min_duration_statement to '0' causes printing