Re: [GENERAL] Migration Query

2017-05-08 Thread Venkata B Nagothi
On Tue, May 9, 2017 at 1:13 AM, PAWAN SHARMA wrote: > Hi All, > > Does one any having list of bottlenecks and workarounds while migrating > data > from Oracle to Postgresql. like what are thing which we can migrate from > Oracle database to Postgresql and what we

Re: [GENERAL] Python versus Other Languages using PostgreSQL

2017-05-08 Thread Neil Anderson
I'm also interested to know which frameworks you're referring to? Regarding Node and Mongo I imagine that they are well suited because Mongo stores JSON documents and Node, being Javascript, has first class support for JSON. Python and PostgreSQL's relationship might be more of a principled one?

Re: [GENERAL] data transformation and replication

2017-05-08 Thread Armand Pirvu (home)
My bad db1 I have two tables t1 and t2 (or more) db2 has one table t3 for example which can get data aggregated from one or more multiple tables from the above set . I can updates/inserts/deletes in db1.t1 and/or db1.t2 which combined may mean related data in db.t3 would need to be

Re: [GENERAL] Python versus Other Languages using PostgreSQL

2017-05-08 Thread Paul Hughes
Thank you for the links. I'm glad there are other languages that are working with PostgreSQL. My question still remains though - why is it that all the largest web platforms that have used PostgreSQL *specifically* choose Python as their back-end language? Why are Postgres and Python so married,

[GENERAL] slow query on multiple table join

2017-05-08 Thread tao tony
hi guys, I met a query performance issue in postgresql 9.6.2 with multiple tables joined. there were 2 slow queries,and the reasons were the same:the optimizer generate a bad explain which using nest loop. attached is the query and its explain.all tables are small and the indexes were only

Re: [GENERAL] Python versus Other Languages using PostgreSQL

2017-05-08 Thread Adrian Klaver
On 05/08/2017 05:45 PM, Paul Hughes wrote: Thank you for the links. I'm glad there are other languages that are working with PostgreSQL. My question still remains though - why is it that all the largest web platforms that have used PostgreSQL *specifically* choose Python as their back-end

Re: [GENERAL] [plnc...@gmail.com: Can I safe my Data?]

2017-05-08 Thread Adrian Klaver
On 05/08/2017 03:34 PM, Alvaro Herrera wrote: Hello.. My name is Rian. I have a problem, my Database attacked by ransomware virus. Some file has encrypt. for pg_hba and postgresql.conf i have a backup, but for some file like pg_filenode.map i dont have. this a log when i start the

Re: [GENERAL] Python versus Other Languages using PostgreSQL

2017-05-08 Thread Adrian Klaver
On 05/08/2017 02:26 PM, Paul Hughes wrote: Hello, I noticed that most of the largest web platforms that use PostgreSQL as their primary database, also use Python as their primary back-end language. Yet, according to every benchmark I could find over the last couple of years, back-end languages

[GENERAL] [p...@vivation.com: Python versus Other Languages using PostgreSQL]

2017-05-08 Thread Alvaro Herrera
--- Begin Message --- Hello, I noticed that most of the largest web platforms that use PostgreSQL as their primary database, also use Python as their primary back-end language. Yet, according to every benchmark I could find over the last couple of years, back-end languages like PHP, HHVM, and

[GENERAL] Python versus Other Languages using PostgreSQL

2017-05-08 Thread Paul Hughes
Hello, I noticed that most of the largest web platforms that use PostgreSQL as their primary database, also use Python as their primary back-end language. Yet, according to every benchmark I could find over the last couple of years, back-end languages like PHP, HHVM, and Node.JS outperform Python

[GENERAL] [plnc...@gmail.com: Can I safe my Data?]

2017-05-08 Thread Alvaro Herrera
-- Álvaro Herrera Developer, https://www.PostgreSQL.org/ "The problem with the facetime model is not just that it's demoralizing, but that the people pretending to work interrupt the ones actually working." (Paul

Re: [GENERAL] Select from tableA - if not exists then tableB

2017-05-08 Thread Brian Dunavant
>From what you're saying about migrating, I'm assuming the new table has additional columns or something. If you can map the difference, then you could use CTE's to select from the first table, and if nothing is there, then pull from the second table and pad it with nulls so they "match". This

Re: [GENERAL] Select from tableA - if not exists then tableB

2017-05-08 Thread David Rowley
On 9 May 2017 at 09:56, Patrick B wrote: > Hi guys, > > I have two tables that supports the same data, but different table DDL (We > are migrating all the data from one to another). > > What I need is basically: > > 1. Query looks for the data on table A, > 2. if it

Re: [GENERAL] Select from tableA - if not exists then tableB

2017-05-08 Thread Adrian Klaver
On 05/08/2017 02:56 PM, Patrick B wrote: Hi guys, I have two tables that supports the same data, but different table DDL (We are migrating all the data from one to another). What I need is basically: 1. Query looks for the data on table A, 2. if it doesn't find it on table A, go look for it

[GENERAL] Select from tableA - if not exists then tableB

2017-05-08 Thread Patrick B
Hi guys, I have two tables that supports the same data, but different table DDL (We are migrating all the data from one to another). What I need is basically: 1. Query looks for the data on table A, 2. if it doesn't find it on table A, go look for it on table B Now, how could I do that in a

Re: [GENERAL] data transformation and replication

2017-05-08 Thread Adrian Klaver
On 05/08/2017 12:46 PM, Armand Pirvu (home) wrote: Hi Here it is a scenario which I am faced with and I am hoping to find a pointer/tip/help db1 is the OLTP system db2 is the Reporting system The data from db1 needs to get to db2, but the database on those two have tables with different

[GENERAL] data transformation and replication

2017-05-08 Thread Armand Pirvu (home)
Hi Here it is a scenario which I am faced with and I am hoping to find a pointer/tip/help db1 is the OLTP system db2 is the Reporting system The data from db1 needs to get to db2, but the database on those two have tables with different layout/structure and hence data will need to suffer

Re: [GENERAL] Can PG replace redis, amqp, s3 in the future?

2017-05-08 Thread Scott Marlowe
On Mon, May 1, 2017 at 2:59 PM, Sven R. Kunze wrote: > On 30.04.2017 16:25, Steve Atkins wrote: > > You can use postgresql for caching, but caches don't require the data > durability that a database offers, and can be implemented much more > efficiently. > > > I for one can

[GENERAL] Partitioning and Table Inheritance

2017-05-08 Thread Paul A Jungwirth
I'm working on a problem where partitioning seems to be the right approach, but we would need a lot of partitions (say 10k or 100k). Everywhere I read that after ~100 child tables you experience problems. I have a few questions about that: 1. Is it true that the only disadvantage to 10k children

Re: [GENERAL] Migration Query

2017-05-08 Thread Chris Mair
Does one any having list of bottlenecks and workarounds while migrating data from Oracle to Postgresql. like what are thing which we can migrate from Oracle database to Postgresql and what we can't? Which is the best tool for migration from Oracle to Postgresql? Hi, I like this tool and

[GENERAL] Migration Query

2017-05-08 Thread PAWAN SHARMA
Hi All, Does one any having list of bottlenecks and workarounds while migrating data from Oracle to Postgresql. like what are thing which we can migrate from Oracle database to Postgresql and what we can't? Which is the best tool for migration from Oracle to Postgresql? -Pawan

Re: [GENERAL] Very suspicious plan difference for select and corresponding delete queries PostgreSQL 9.6.2

2017-05-08 Thread Tom Lane
Maxim Boguk writes: > I can not see any possible/logical/realistic reason for the database to > switch between INDEX ONLY SCAN and SEQ SCAN for EXIST part of query in this > two cases. If you'd done an EXPLAIN VERBOSE, you'd have noted that the scan was returning ctid,

[GENERAL] Very suspicious plan difference for select and corresponding delete queries PostgreSQL 9.6.2

2017-05-08 Thread Maxim Boguk
Hi, I found a case with very curious plan difference between: explain select * from jobs_to_delete WHERE EXISTS(SELECT 1 FROM job_stats_new_201411 jsm WHERE jsm.job_reference = jobs_to_delete.job_reference); QUERY PLAN