Re: [GENERAL] Howto to clear PostgreSQL cache and how to preload all tuples of a table into the cache?

2011-12-11 Thread Raghavendra
On Mon, Dec 12, 2011 at 8:33 AM, Craig Ringer wrote: > On 12/12/2011 08:42 AM, Stefan Keller wrote: > >> I'd like to clear the PostgreSQL cache (e.g. for benchmarking purposes). >> And I'd like to preload all tuples of a table (say mytable_one) into the >> cache. >> >> AFAIK there is no way to fo

Re: [GENERAL] Hope for a new PostgreSQL era?

2011-12-11 Thread Ondrej Ivanič
Hi, On 12 December 2011 15:39, Jayadevan M wrote: > At the db level, Oracle provides "Database replay" feature. that lets you > replay the production server events in the development/test environment. > http://docs.oracle.com/cd/B28359_01/server.111/e12253/dbr_intro.htm > Won't something like thi

Re: [GENERAL] Hope for a new PostgreSQL era?

2011-12-11 Thread Jayadevan M
Hello, > Absolutely. SystemTap would be useful if I'm able to reproduce the situation > outside the production system. However, in most cases, it would be actually > difficult. At the db level, Oracle provides "Database replay" feature. that lets you replay the production server events in the de

Re: [GENERAL] Problem installing PG9.1 using yum

2011-12-11 Thread devrim
This message has been digitally signed by the sender. Re___GENERAL__Problem_installing_PG9_1_using_yum.eml Description: Binary data - Hi-Tech Gears Ltd, Gurgaon, India -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Controlling complexity in queries

2011-12-11 Thread Craig Ringer
On 12/12/2011 09:15 AM, David Johnston wrote: Use a WITH clause on the SELECT statement. Note that WITH is an optimisation fence, so if you're relying on Pg pushing WHERE clauses down into subqueries or anything like that you may find that your query runs a LOT slower when broken up as WITH exp

Re: [GENERAL] Howto to clear PostgreSQL cache and how to preload all tuples of a table into the cache?

2011-12-11 Thread Craig Ringer
On 12/12/2011 08:42 AM, Stefan Keller wrote: I'd like to clear the PostgreSQL cache (e.g. for benchmarking purposes). And I'd like to preload all tuples of a table (say mytable_one) into the cache. AFAIK there is no way to force all caches to be cleared in PostgreSQL with an SQL command. The onl

Re: [GENERAL] Controlling complexity in queries

2011-12-11 Thread David Johnston
Inlined. David J. On Dec 11, 2011, at 19:46, Robert James wrote: > I have a very long query. Due to the planner and good indexing, it > runs quite fast. But it's so long, it's quite hard to follow. > > I'm trying to break it up into pieces, but am running up against > limits of SQL. Can you

[GENERAL] Controlling complexity in queries

2011-12-11 Thread Robert James
I have a very long query. Due to the planner and good indexing, it runs quite fast. But it's so long, it's quite hard to follow. I'm trying to break it up into pieces, but am running up against limits of SQL. Can you help me with any of these problems? 1. SELECT AS A, AS C, AS D ... I'd li

Re: [GENERAL] Denormalizing via SQL

2011-12-11 Thread David Johnston
On Dec 11, 2011, at 19:40, Robert James wrote: > I have a query returning: > > name | product_id > Bob | 1 > Bob | 2 > Charles | 1 > Charles | 4 > > To make it compatible with a legacy app, I need to convert it to this form: > name | product_ids > Bob | "1,2" > Charles | "1,4" > > (Before you

[GENERAL] Howto to clear PostgreSQL cache and how to preload all tuples of a table into the cache?

2011-12-11 Thread Stefan Keller
I'd like to clear the PostgreSQL cache (e.g. for benchmarking purposes). And I'd like to preload all tuples of a table (say mytable_one) into the cache. AFAIK there is no way to force all caches to be cleared in PostgreSQL with an SQL command. The only way to achieve this, seems to restart PG (ser

[GENERAL] Denormalizing via SQL

2011-12-11 Thread Robert James
I have a query returning: name | product_id Bob | 1 Bob | 2 Charles | 1 Charles | 4 To make it compatible with a legacy app, I need to convert it to this form: name | product_ids Bob | "1,2" Charles | "1,4" (Before you jump "That's not normal!" - I know. I didn't write the app. I just need to

Re: [GENERAL] Hope for a new PostgreSQL era?

2011-12-11 Thread Eduardo Morras
Sorry for delay, I wonder if the prioritisation could be done using nice - each backend is a separate process, so why not to do 'nice(10)' for low priority processes or something like that. Yes, to a limited degree you can prioritise queries using nice and ionice, but it's awkward because

Re: [GENERAL] Hope for a new PostgreSQL era?

2011-12-11 Thread Satoshi Nagayasu
2011/12/10 10:54, Greg Smith wrote: On 12/08/2011 09:48 AM, Satoshi Nagayasu wrote: For examples, I've been working on investigating PostgreSQL LWLock behaviors precisely for a few weeks, and it could not be obtained within PostgreSQL itself, therefore, I picked up SystemTap. However, SystemTap

Re: [GENERAL] Problem installing PG9.1 using yum

2011-12-11 Thread Devrim GÜNDÜZ
On Sun, 2011-12-11 at 09:17 -0800, wstrzalka wrote: > Error: Package postgresql90-devel needs postgresql90 = > 9.0.1-4PGDG.rhel5, this is not available. Please remove postgresql90-devel.i386 prior to installation. We don't push -devel.i386 packages to x86_64 repos anymore. Regards, -- Devrim

[GENERAL] Postgresql featured on Hacker News

2011-12-11 Thread Vincent Veyron
It's under the title : The key value store we ignored (Postgresql) HN's home page : http://news.ycombinator.com/news The article mentionned is here : http://blog.creapptives.com/post/14062057061/the-key-value-store-everyone-ignored-postgresql Good day, -- Vincent Veyron http://mari

[GENERAL] Problem installing PG9.1 using yum

2011-12-11 Thread wstrzalka
I'm trying to install PG9.1 on RHEL5 and I have some problems with it. Currently there is some old version of PG90 installed but theoretically 90 & 91 should cohabit together without any problems. yum list postgresql* -

Re: [GENERAL] Improve replication usability

2011-12-11 Thread Magnus Hagander
On Sun, Dec 11, 2011 at 02:58, Andrew Armstrong wrote: > Hello, > > First off, thanks for a great product. > > I've been looking at setting up replication on Windows between two servers > using pgsql 9.1 > > I'm going to give up for now though because I'm finding it difficult to get > it working c

[GENERAL] initdb locale WIN1252

2011-12-11 Thread Abraham, Danny
What's wrong with locale WIN1252 ? Running successfully initdb, but strange warnings show ... The files belonging to this database system will be owned by user "EMPG". This user must also own the server process. The database cluster will be initialized with locale English_United States.1252. Th

[GENERAL] sort order

2011-12-11 Thread Abraham, Danny
On PG 9.0.4, Windows, Encoding and Collate WIN1252 trying to get a database to sort according to the ascii order. Example: Select t from test order by t Should be exactly like Select t from test order by ascii(t). Can it be done? How? Thanks Danny