Re: [PERFORM] How to clean/truncate / VACUUM FULL pg_largeobject without (much) downtime?

2015-05-22 Thread Jim Nasby
On 5/11/15 4:55 AM, Muthusamy, Sivaraman wrote: Hi Group, Facing a problem where pg_catalog.pg_largetobject has been growing fast recently, in last two weeks. The actual data itself, in user tables, is about 60GB, but pg_catalog.pg_largeobject table is 200GB plues. Please let me know how to

Re: [PERFORM] Fastest way / best practice to calculate next birthdays

2015-05-22 Thread Jim Nasby
On 5/21/15 11:15 AM, Bosco Rama wrote: You could probably make some of that into a function that accepts a timestamptz and generates the two days. You'll be better off if instead of 2 days it gives you a daterange: http://www.postgresql.org/docs/9.4/static/rangetypes.html I don't know about

Re: [PERFORM] MAX() and multi-column index on a partitioned table?

2015-05-22 Thread Tom Lane
Dave Johansen davejohan...@gmail.com writes: I'm trying to call MAX() on the first value of a multi-column index of a partitioned table and the planner is choosing to do a sequential scan instead of an index scan. Is there something I can do to fix this? What PG version are you using? 9.1 or

Re: [PERFORM] MAX() and multi-column index on a partitioned table?

2015-05-22 Thread Dave Johansen
On Fri, May 22, 2015 at 3:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: Dave Johansen davejohan...@gmail.com writes: I'm trying to call MAX() on the first value of a multi-column index of a partitioned table and the planner is choosing to do a sequential scan instead of an index scan. Is there

Re: [PERFORM] MAX() and multi-column index on a partitioned table?

2015-05-22 Thread Tom Lane
Dave Johansen davejohan...@gmail.com writes: On Fri, May 22, 2015 at 3:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: What PG version are you using? 9.1 or newer should know how to do this with a merge append of several indexscans. Sorry, I should have mentioned that in the original email. I'm

[PERFORM] MAX() and multi-column index on a partitioned table?

2015-05-22 Thread Dave Johansen
I'm trying to call MAX() on the first value of a multi-column index of a partitioned table and the planner is choosing to do a sequential scan instead of an index scan. Is there something I can do to fix this? Here's a simplified version of our schema: CREATE TABLE data ( tutci DOUBLE PRECISION,

Re: [PERFORM] PostgreSQL disk fragmentation causes performance problems on Windows

2015-05-22 Thread Josh Berkus
On 05/21/2015 01:39 PM, Andres Freund wrote: On 2015-05-21 11:54:40 -0700, Josh Berkus wrote: This has been talked about as a feature, but would require major work on PostgreSQL to make it possible. You'd be looking at several months of effort by a really good hacker, and then a whole bunch