Re: [GENERAL] effective_cache_size X shared_buffer

2017-04-02 Thread Venkata B Nagothi
On Mon, Apr 3, 2017 at 1:33 PM, Patrick B wrote: > 2017-04-03 13:23 GMT+12:00 Patrick B : > >> Hi guys. >> >> I'm thinking about increasing the query cache for my PG 9.2 server. >> I've got a project happening, which is doing lots and lots of writes and >> reads during the night, and in the morni

Re: [GENERAL] effective_cache_size X shared_buffer

2017-04-02 Thread Venkata B Nagothi
On Mon, Apr 3, 2017 at 11:23 AM, Patrick B wrote: > Hi guys. > > I'm thinking about increasing the query cache for my PG 9.2 server. > I've got a project happening, which is doing lots and lots of writes and > reads during the night, and in the morning I see PG cache warming up again, > as all th

Re: [GENERAL] effective_cache_size X shared_buffer

2017-04-02 Thread Patrick B
2017-04-03 13:23 GMT+12:00 Patrick B : > Hi guys. > > I'm thinking about increasing the query cache for my PG 9.2 server. > I've got a project happening, which is doing lots and lots of writes and > reads during the night, and in the morning I see PG cache warming up again, > as all the cache "was

[GENERAL] effective_cache_size X shared_buffer

2017-04-02 Thread Patrick B
Hi guys. I'm thinking about increasing the query cache for my PG 9.2 server. I've got a project happening, which is doing lots and lots of writes and reads during the night, and in the morning I see PG cache warming up again, as all the cache "was used" by those write and read tasks. So my enviro

Re: [GENERAL] Merging records in a table with 2-columns primary key

2017-04-02 Thread Francisco Olarte
Alexander: On Sun, Apr 2, 2017 at 5:27 PM, Alexander Farber wrote: > 2) Is there a way to use an UPDATE reviews instead of the inefficient > (because copying) INSERT ... SELECT ... ON CONFLICT DO NOTHING? mmm, I've just sent a sugestion to use delete+reinsert and would like to point that in pg u

Re: [GENERAL] Merging records in a table with 2-columns primary key

2017-04-02 Thread Francisco Olarte
Alexander: On Sun, Apr 2, 2017 at 4:26 PM, Alexander Farber wrote: > The purpose of the function is to merge several user records to one (with > the lowest uid). It looks complicated ( more on this later ) > While merging the reviews records I delete all self-reviews and try to copy > over as m

Re: [GENERAL] Merging records in a table with 2-columns primary key

2017-04-02 Thread Alexander Farber
Hello Andy and others - On Sun, Apr 2, 2017 at 5:13 PM, Andy Colson wrote: > On 04/02/2017 09:26 AM, Alexander Farber wrote: >> >> http://stackoverflow.com/questions/43168406/merging-records- >> in-a-table-with-2-columns-primary-key > > after some thinking, when I call SELECT out_uid FROM merg

Re: [GENERAL] Merging records in a table with 2-columns primary key

2017-04-02 Thread Andy Colson
On 04/02/2017 09:26 AM, Alexander Farber wrote: Good afternoon, I have prepared a simple test case for my question - CREATE TABLE users ( uid SERIAL PRIMARY KEY, name varchar(255) NOT NULL ); CREATE TABLE reviews ( uid integer NOT NULL CHECK (uid <> author) REFERENCES u

[GENERAL] Merging records in a table with 2-columns primary key

2017-04-02 Thread Alexander Farber
Good afternoon, I have prepared a simple test case for my question - CREATE TABLE users ( uid SERIAL PRIMARY KEY, name varchar(255) NOT NULL ); CREATE TABLE reviews ( uid integer NOT NULL CHECK (uid <> author) REFERENCES users ON DELETE CASCADE, author integer NOT

Re: [GENERAL] My humble tribute to psql -- usql v0.5.0

2017-04-02 Thread Kenneth Shaw
Unfortunately, the \d* commands aren't implemented yet, as there's a lot of research that needs to be done for all the key databases, which I just haven't had time to do yet. But that's coming very soon (tm)!** The main work done so far has been just getting the cli up to something usable. ** for

Re: [GENERAL] My humble tribute to psql -- usql v0.5.0

2017-04-02 Thread Andy Colson
On 04/02/2017 07:55 AM, Kenneth Shaw wrote: Hi All, usql is built in Go, and as of today supports all the major databases (PostgreSQL, MySQL, SQLite3, Microsoft SQL Server, Oracle Database) and more! Additionally, with v0.5.0, released today, usql now has implemented most of the basic, and much

[GENERAL] My humble tribute to psql -- usql v0.5.0

2017-04-02 Thread Kenneth Shaw
Hi All, I apologize in advance if this is somewhat off-topic, but I thought I would inform the people (ie, psql users) about usql, a universal-command line tool that aims to work the same way psql does, but with every database (not just PostgreSQL). usql is built in Go, and as of today supports a