[SQL] Profiling tool for postgres under win32
Hi, I'm using the Postgres database system version 8.3 for a J2EE application. I'd like to profile and monitor in "real time" the status of my queries because I notice some slow loading. Can anyone tell how to get a "good" profiling tool for the Postgres database system ? Thanks in advance.
Re: [SQL] Profiling tool for postgres under win32
In response to aymen marouani : > Hi, > I'm using the Postgres database system version 8.3 for a J2EE application. > I'd like to profile and monitor in "real time" the status of my queries > because I notice some slow loading. > Can anyone tell how to get a "good" profiling tool for the Postgres database > system ? Set log_min_duration to a propper value and analyse your slow queries. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431 2EB0 389D 1DC2 3172 0C99 -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql
Re: [SQL] CREATE SERVER - what is this?
Le mardi 24 novembre 2009 à 16:45:27, Richard Broersma a écrit : > I noticed a few new SQL references in the manual: > > CREATE SERVER > CREATE FOREIGN DATA WRAPPER, > CREATE USER MAPPING > > Is this similar to DBI-Link? > They appear on the 8.4 release. They were added to support the use of SQL/MED compliant FOREIGN DATA WRAPPER, SERVER, and USER MAPPING as method to supply dblink connect parameters. dblink can already use these informations AFAIK. -- Guillaume. http://www.postgresqlfr.org http://dalibo.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql
[SQL] How to start the "auto_explain" module
Hi, In order to profile my Postgres queries, I used the "auto_explain.lo g_min_duration (integer)". How can I load the auto_explain module ? Thanks in advance.
Re: [SQL] Profiling tool for postgres under win32
On 26/11/2009 5:48 PM, aymen marouani wrote: > Hi, > I'm using the Postgres database system version 8.3 for a J2EE application. > I'd like to profile and monitor in "real time" the status of my queries > because I notice some slow loading. > Can anyone tell how to get a "good" profiling tool for the Postgres > database system ? I'm not aware of any tools that connect to the database to provide profiling and monitoring. What the right course of action is depends on what sort of slowdown you're encountering. If it's particular activities within the program that're a problem, then you should probably use logging in your application to record database activity (including query runtimes) to see what exactly it's doing. If it's unpredictable slowdowns in operations that are normally fast, then you need to look at the database end. Look into locking issues ( see: pg_catalog.pg_locks ), table bloat and VACUUM / autovacuum, and the possibility of simple concurrent load spikes ( see pg_catalog.pg_stat_activity ). Typically what you'll do if you're seeing unpredictably slow queries is use log_min_duration to log problem statements to the PostgreSQL log, which you can then analyse. If you enable CSV logging, you can pull the PostgreSQL log into a database, spreadsheet, or whatever for easier analysis. The new auto_explain module in 8.4 is excellent and very helpful too, since it can help you find out what plans were used to execute problem queries easily and conveniently. Of course, this won't help you much if your problem is an application issuing *huge* numbers of very small queries. You can set Pg to log every query, but you'll rapidly have an apalling amount of data to troll through, and it's hard to know which ones are related to user-perceived slowdowns. Application logging is usually a better option for tracking this sort of thing down. Out of interest, how are you talking to PostgreSQL? Hand-written SQL via JDBC? Hibernate / TopLink / some other ORM (possibly via JPA)? If you're using Hibernate, just enable its query logging features via log4j and watch what happens. -- Craig Ringer -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql
Re: [SQL] How to start the "auto_explain" module
In response to aymen marouani : > Hi, > In order to profile my Postgres queries, I used > the "auto_explain.log_min_duration (integer)". > How can I load the auto_explain module ? > Thanks in advance. http://www.depesz.com/index.php/2008/11/23/waiting-for-84-auto-explain/ Read that. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431 2EB0 389D 1DC2 3172 0C99 -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql