Re: [GENERAL] a JOIN to a VIEW seems slow

2017-10-07 Thread Frank Millman
On 5 Oct 2017, at 9:51 AM, Frank Millman wrote: > > I should have re-stated the reason for my original post. > > Exactly the same query, on exactly the same data, takes 1.8 seconds on Sql > Server, 1.0 seconds on SQLite3, and 1607 seconds, or 26 minutes, on > PostgreSQL 9.4.4. > I will give

Re: [GENERAL] a JOIN to a VIEW seems slow

2017-10-07 Thread David Rowley
On 7 October 2017 at 22:34, Frank Millman wrote: > 4. Select from ar_trans_due including join to ar_trans, > plus sub_select from ar_trans_alloc including join to ar_trans > SELECT *, > (SELECT SUM(c.alloc_cust) > FROM ar_trans_alloc c > LEFT JOIN ar_tra

[GENERAL] table partition problem

2017-10-07 Thread Hung Phan
Hi, I intend to create 2 partitions called New and Old of a table. An automatic job will check if a record is older than 90 days from current time (based on a field), it will move the record from New to Old. The problem is that I cannot control which partition a select statement with range criter