[SQL] Profiling postgresql queries

2008-07-09 Thread Nacef LABIDI
Hi all, I was wondering if there is any GUI or command line based tool running on windows that could help me to profile PostgreSQL queries performance. It should be able to do live profiling since I want to profile the accesses that my application is doing on the Postgres database. Thanks to all N

Re: [SQL] Profiling postgresql queries

2008-07-09 Thread A. Kretschmer
am Wed, dem 09.07.2008, um 10:22:09 +0200 mailte Nacef LABIDI folgendes: > Hi all, > I was wondering if there is any GUI or command line based tool running on > windows that could help me to profile PostgreSQL queries performance. It > should You can use EXPLAIN ANALYSE to analyse your queries (

[SQL] selecting N record for each group

2008-07-09 Thread Ivan Sergio Borgonovo
There are many ways to achieve this: http://rickosborne.org/blog/index.php/2008/01/07/sql-getting-top-n-rows-for-a-grouped-query/ http://www.xaprb.com/blog/2006/12/07/how-to-select-the-firstleastmax-row-per-group-in-sql/ http://weblogs.sqlteam.com/jeffs/archive/2007/03/30/More-SQL-Server-2005-Solu

[SQL] Re: Best practice for long-lived journal tables: bigint or recycling IDs?

2008-07-09 Thread Mark Stosberg
> > > 3. Deal with wraparound by ensuring that the applications behave sanely > > > > Wrap-around? > > > > Exceeding the max size of "int" looks more like a brick wall than > > wrap-around to me: > > > > insert into t values (2147483648); > > ERROR: integer out of range > > Hmm, you can a