Re: [PERFORM] Postgres not using all RAM (Huge Page activated on a 96GB RAM system)

2017-03-24 Thread Andrew Kerber
postgres 20 0 24.722g 14812 12956 S 0.3 0.0 0:07.36 > postgres > > > 9068 postgres 20 0 24.722g 6380 4232 S 0.3 0.0 0:02.15 > postgres > > > 9065 postgres 20 0 24.727g 10368 3516 S 0.0 0.0 0:04.24 > postgres > > > 9066 postgres 20 0 24.722g 4100 2248 S 0.0 0.0 0:06.04 > postgres > > > 9067 postgres 20 0 24.722g 4100 2248 S 0.0 0.0 0:01.37 > postgres > > > 9069 postgres 20 0 161740 4596 2312 S 0.0 0.0 0:04.48 > postgres > > What’s wrong with this? There isn’t something wrong in RAM usage? > > Thank you all >Pietro > -- Andrew W. Kerber 'If at first you dont succeed, dont take up skydiving.'

Re: [PERFORM] Big number of connections

2016-03-31 Thread Andrew Dunstan
It should solve your problems. If they are going to keep the client connections open, they would need to run pgbouncer in statement or transaction mode. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscrip

Re: [PERFORM] jsonb_agg performance

2016-01-29 Thread Andrew Dunstan
text. Rendering jsonb as text to the client involves a lot more processing. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] problem with select *

2015-08-24 Thread Andrew Dunstan
he, 1.6GHz CPU, linux 14.04 OS, 8GB RAM. You should be using a cursor. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] pg bouncer issue what does sv_used column means

2015-06-12 Thread Andrew Dunstan
Please do not cross-post on the PostgreSQL lists. Pick the most appropriate list to post to and just post there. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [PERFORM] Fastest Backup & Restore for perf testing

2015-05-27 Thread Andrew Dunstan
the entire application/OS/anything is no issue for me—there’s no data for me to lose. Thanks! Read all of this chapter. <http://www.postgresql.org/docs/current/static/backup.html> cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To ma

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

2015-04-29 Thread Andrew Dunstan
nment. Linux/Solaris/FreeBSD do not suffer from this issue in nearly the same manner. jD You might consider a CLUSTER or VACUUM FULL to re-write the table with less fragmentation. Or pg_repack if you can't handle the lockup time that these involve. cheers andrew -- Sent via pgsql

Re: [PERFORM] Number of Columns and Update

2014-12-22 Thread Andrew Dunstan
update rewrites the whole row, not just the updated columns. I think you are overthinking it. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Re: [SQL] querying with index on jsonb slower than standard column. Why?

2014-12-12 Thread Andrew Dunstan
now and making that turn a string into a number if possible seems to me to be going in the wrong direction. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Re: [SQL] querying with index on jsonb slower than standard column. Why?

2014-12-12 Thread Andrew Dunstan
But I'm not sure how we do that except in a really ugly and ad-hoc fashion. I would be inclined to add the operator and see how cumbersome people find it. I suspect in many cases it might be sufficient. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgres

Re: [PERFORM] Postgres does not use indexes with OR-conditions

2014-11-07 Thread Andrew Dunstan
ml> Second, the last test for fd.creation_time in your query seems redundant. Could you not rewrite it as something this?: where fd.creation_time <= '2011-11-07 10:39:07.285022+08' and (fd.creation_time < '2011-11-07 10:39:07.285022+08' or fd

Re: [PERFORM] assignment vs SELECT INTO

2014-11-03 Thread Andrew Dunstan
On 11/03/2014 03:24 PM, Tom Lane wrote: Andrew Dunstan writes: andrew=# do $x$ declare r abc; begin for i in 1 .. 1000 loop select 'a','b',i into r.x,r.y,r.z; end loop; end; $x$; DO Time: 63731.434 ms andrew=# do $x$ declare r abc; begin fo

[PERFORM] assignment vs SELECT INTO

2014-11-03 Thread Andrew Dunstan
I found out today that direct assignment to a composite type is (at least in my test) about 70% faster than setting it via SELECT INTO. That seems like an enormous difference in speed, which I haven't really been able to account for. Test case: andrew=# \d abc

Re: [PERFORM] Query with large number of joins

2014-10-21 Thread Andrew Dunstan
INNER JOIN "public"."lookup" "romeo_bravo" ON ("papa_four"."quebec" = "romeo_bravo"."quebec") LEFT JOIN "public"."juliet_two" "juliet_two" ON ("foxtrot_india&qu

Re: [PERFORM] char(N), varchar(N), varchar, text

2014-10-08 Thread Andrew Dunstan
assume no big performance differences? Thanks alot! Emi Why do you need to ask if you already have the answer? Depesz is right. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.or

Re: [PERFORM] help: function failing

2014-10-07 Thread Andrew Dunstan
etely the wrong forum for this query. usage questions should be on pgsql-general. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] postgres 9.3 vs. 9.4

2014-09-18 Thread Andrew Dunstan
ortunately, posgtress does not tell me where the bottleneck is. Is this is defensively not the disk IO. This is when you dig out tools like perf, maybe. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: ht

Re: [PERFORM] Tuning Postgres for Single connection use

2014-04-14 Thread Andrew Dunstan
on Windows". shared_buffers above 512Mb causes performance to degrade on Windows, while that threshold is much higher on *nix. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] query against large table not using sensible index to find very small amount of data

2014-04-12 Thread Andrew W. Gibbs
vents table, even though this would feel a little bit like a hack. Any insights would be greatly appreciate. -- AWG On Tue, Apr 08, 2014 at 09:55:38AM -0400, Tom Lane wrote: > "Andrew W. Gibbs" writes: > > A very common query against this table is of the form... > > &g

Re: [PERFORM] query against large table not using sensible index to find very small amount of data

2014-04-08 Thread &#x27;Andrew W. Gibbs'
Your understanding of the utility of multi-part indices does not jive with my own. While I agree that a partial index might be in order here, that ought just be a performance optimization that lowers the footprint of the index from an index size and index maintenance standpoint, not something that

[PERFORM] query against large table not using sensible index to find very small amount of data

2014-04-08 Thread Andrew W. Gibbs
I have a fairly large table (~100M rows), let's call it "events", and among other things it has a couple of columns on it, columns that we'll call entity_type_id (an integer) and and published_at (a timestamp). It has, among others, indices on (published_at) and (entity_type_id, published_at). A

Re: [PERFORM] Are there some additional postgres tuning to improve performance in multi tenant system

2013-12-28 Thread Andrew Dunstan
On 12/28/2013 08:46 AM, ankush upadhyay wrote: On Sat, Dec 28, 2013 at 6:50 PM, Andrew Dunstan <mailto:and...@dunslane.net>> wrote: On 12/28/2013 12:19 AM, ankush upadhyay wrote: Hello All, I am using multi tenant system and doing performance testing

Re: [PERFORM] Are there some additional postgres tuning to improve performance in multi tenant system

2013-12-28 Thread Andrew Dunstan
usually use the term "multi-tenancy" to refer to different postgres instances running on the same machine, rather than different databases within a single instance of postgres. So lease describe your setup in more detail. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-p

Re: [PERFORM] Current query of the PL/pgsql procedure.

2013-12-16 Thread Andrew Dunstan
ss. Check this for example: http://www.depesz.com/2010/03/18/profiling-stored-proceduresfunctions/ Also, the auto-explain module can peer inside functions. See <http://www.postgresql.org/docs/current/static/auto-explain.html> cheers andrew -- Sent via pgsql-performance mailing li

Re: [PERFORM] Postgresql in a Virtual Machine

2013-11-26 Thread Andrew Dunstan
Not-pre-allocated disk-file backed is just about the worst case in my experience. Try pre-allocated VirtIO disks on an LVM volume group - you should get much better performance. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to

Re: [PERFORM] Postgresql in a Virtual Machine

2013-11-26 Thread Andrew Dunstan
be your best bet. Depends a bit on your application and your workload. And yes, I've used it. Full disclosure: I have done work paid for by Heroku. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Postgresql in a Virtual Machine

2013-11-25 Thread Andrew Dunstan
mong others.) Pretty much all of these are VM based, and can be suitable for many workloads. Maybe the advice is a bit out of date. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Performance bug in prepared statement binding in 9.2?

2013-09-11 Thread Andrew Dunstan
y we don't have transaction_timeout, or maybe transaction_idle_timeout. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] slow sort

2013-09-11 Thread Andrew Dunstan
irrelevant to the aggregation. This gets hard when queries are very complex, and harder still when the query is written by a query generator. But a good generator should not just say "grouo by everything that's not aggregated" and think it's doing a good job. In your case it should be relatively straightforward. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Intermittent hangs with 9.2

2013-09-10 Thread Andrew Dunstan
ite high, especially on a 48Gb box. What happens if you dial that back to, say, 12Gb? cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Performance bug in prepared statement binding in 9.2?

2013-09-10 Thread Andrew Dunstan
;xmin advance these days and thus might help to reduce the impact of the longrunning transactions. Otherwise you will have to shorten those... Yeah, we're looking at eliminating them. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To ma

Re: [PERFORM] Performance bug in prepared statement binding in 9.2?

2013-09-10 Thread Andrew Dunstan
gside this one. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Performance bug in prepared statement binding in 9.2?

2013-09-09 Thread Andrew Dunstan
rs + 0.25% postgres [.] pg_verify_mbstr_len cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Varchar vs foreign key vs enumerator - table and index size

2013-09-02 Thread Andrew Dunstan
changing the sort order, because those things would require processing tables where the type is used, unlike the simple things. But neither of these is required for typical use cases. For most uses of this kind they are very efficient both in storage and processing. cheers andrew -- Sent v

Re: [PERFORM] Hstore VS. JSON

2013-07-16 Thread Andrew Dunstan
Hstore and JSON are not different in this respect. You should test the storage effects with your data. On 9.2 for your data hstore might be a better bet, since in 9.2 hstore has more operators available natively. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance

Re: [PERFORM] Process in state BIND, authentication, PARSE

2013-07-08 Thread Andrew Dunstan
x27;t given us nearly enough information about your setup. We'd need to see your configuration settings and have some details of the machine and where connections are coming from to diagnose it further. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.or

Re: [PERFORM] Dynamic queries in stored procedure

2013-07-05 Thread Andrew Dunstan
by, etc. No, I don't want to use orm. It's a matter of taste. Pretty much every PL has facilities for constructing and running dynamic sql. PLPgsql ,PLPerl, PLV8 ... cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes t

Re: [PERFORM] Partitions not Working as Expected

2013-06-27 Thread Andrew Dunstan
ou have nobody to blame but yourself. There's a reason EDB haven't marked their function immutable - it's not. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] PostgreSQL settings for running on an SSD drive

2013-06-20 Thread Andrew Dunstan
nless you assume that cache misses will be higher for random reads than for sequential reads. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Thinking About Correlated Columns (again)

2013-05-15 Thread Andrew Dunstan
t cases no more than a handful for any given table would be required. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] template1 vacuuming consuming much time compared to another production DBs

2013-04-22 Thread Andrew Dunstan
On 04/22/2013 07:31 AM, pradeep singh wrote: Hi, I am using postgresql 8.1 DB. Why are you using a release of Postgres that is way out of date and unsupported? cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your

Re: [PERFORM] Speed of EXCECUTE in PL/PGSQL

2013-03-14 Thread Andrew Dunstan
d and planned each time. You should expect it to be quite a bit slower, and avoid using EXECUTE wherever possible. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] High CPU usage after partitioning

2013-01-22 Thread Andrew Dunstan
1)); And there you have it. Constraint exclusion does not work in cases like this. It only works with static expressions (such as a literal date in this case). cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription

Re: [PERFORM] High CPU usage after partitioning

2013-01-21 Thread Andrew Dunstan
gger. Does it by any chance use 'execute'? cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] backend suddenly becomes slow, then remains slow

2012-12-27 Thread Andrew Dunstan
On 12/26/2012 11:03 PM, Jeff Janes wrote: On Fri, Dec 14, 2012 at 10:40 AM, Andrew Dunstan wrote: > One of my clients has an odd problem. Every so often a backend will suddenly > become very slow. The odd thing is that once this has happened it remains > slowed down, for all s

Re: [PERFORM] backend suddenly becomes slow, then remains slow

2012-12-14 Thread Andrew Dunstan
On 12/14/2012 02:56 PM, Tom Lane wrote: Andrew Dunstan writes: One of my clients has an odd problem. Every so often a backend will suddenly become very slow. The odd thing is that once this has happened it remains slowed down, for all subsequent queries. Zone reclaim is off. There is no IO or

[PERFORM] backend suddenly becomes slow, then remains slow

2012-12-14 Thread Andrew Dunstan
seen anything like this? cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Why does the number of rows are different in actual and estimated.

2012-12-13 Thread Andrew Dunstan
s=1) Hash Cond: (customerdetails.customerid = entity.id) Well, it looks like it's choosing a join order that's quite a bit different from the way the query is expressed, so the OP might need to play around with forcing the join order some. cheers andrew -- S

Re: [PERFORM] Why does the number of rows are different in actual and estimated.

2012-12-13 Thread Andrew Dunstan
timates to be out by several orders of magnitude. Guaranteeing estimates within bounded accuracy and in a given short amount of time (you don't want your planning time to overwhelm your execution time) isn't possible. cheers andrew -- Sent via pgsql-performance mailing lis

Re: [PERFORM] encouraging index-only scans

2012-12-12 Thread Andrew Dunstan
On 12/12/2012 05:12 PM, Andrew Dunstan wrote: On 12/12/2012 04:32 PM, Tom Lane wrote: Andrew Dunstan writes: A client is testing a migration from 9.1 to 9.2, and has found that a large number of queries run much faster if they use index-only scans. However, the only way he has found to get

Re: [PERFORM] encouraging index-only scans

2012-12-12 Thread Andrew Dunstan
On 12/12/2012 04:32 PM, Tom Lane wrote: Andrew Dunstan writes: A client is testing a migration from 9.1 to 9.2, and has found that a large number of queries run much faster if they use index-only scans. However, the only way he has found to get such a plan is by increasing the seq_page_cost

[PERFORM] encouraging index-only scans

2012-12-12 Thread Andrew Dunstan
encourage such scans that's a but less violent than this? cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Read rows deleted

2012-12-12 Thread Andrew Dunstan
knows a JDBC or a multiplatform code that let read the delete rows of a table without writing of a table file? This isn't a performance related question. Please ask on the correct list (probably pgsql-general). cheers andrew -- Sent via pgsql-performance mailing list (pgsql-perfor

[PERFORM] track_activity_query_size

2012-12-12 Thread Andrew Dunstan
Is there a performance downside to setting track_activity_query_size to a significantly larger value than the default 1024 (say 10240), given that there's plenty of memory to spare? cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make ch

Re: xfs perform a lot better than ext4 [WAS: Re: [PERFORM] Two identical systems, radically different performance]

2012-12-05 Thread Andrew Dunstan
On 12/05/2012 11:51 AM, Jean-David Beyer wrote: I thought that postgreSQL did its own journalling, if that is the proper term, so why not use an ext2 file system to lower overhead? Postgres journalling will not save you from a corrupt file system. cheers andrew -- Sent via pgsql

Re: [PERFORM] Postgres configuration for 8 CPUs, 6 GB RAM

2012-11-27 Thread Andrew Dunstan
. You would normally expect maintenance_work_mem to be higher - sometimes much higher. Apart from that, it's going to be impossible to tell what your problem is without seeing actual slow running queries and their corresponding explain analyse output. cheers andrew -- Sent via

Re: [PERFORM] Poor performance using CTE

2012-11-21 Thread Andrew Dunstan
) 2. WITH NO FENCE foo AS (SELECT ...) 3. WITH NOT FENCE foo AS (SELECT ...) I loke the firsat variant, but the 3rd is most SQL standardish! As Tom (I think) pointed out, we should not have a syntax tied to CTEs. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-p

Re: [PERFORM] Poor performance using CTE

2012-11-21 Thread Andrew Dunstan
t all. Then you have to unset it again, which is ugly. You might even want it applying to *part* of a query, not the whole thing, so this strikes me as a dead end. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscri

Re: [PERFORM] Poor performance using CTE

2012-11-21 Thread Andrew Dunstan
On 11/21/2012 09:59 AM, Tom Lane wrote: Andrew Dunstan writes: If we're going to do it can we please come up with something more intuitive and much, much more documented than "OFFSET 0"? And if/when we do this we'll need to have big red warnings all over then release n

Re: [PERFORM] Poor performance using CTE

2012-11-21 Thread Andrew Dunstan
d to have big red warnings all over then release notes, since a lot of people I know will need to do some extensive remediation before moving to such a release. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http

[PERFORM] partitioning versus clustering

2012-11-19 Thread Andrew W. Gibbs
Postgres Performance Wizards, I am a few years into developing and operating a system underpinned by Postgres that sees the arrival a significant number of events around the clock, not an epic amount of data, but enough to be challenging to me, in particular when system downtime is not very palata

Re: SOLVED - RE: [PERFORM] Poor performance using CTE

2012-11-14 Thread Andrew Dunstan
ed CTEs a LOT precisely because this behaviour lets me get better plans. Without that I'll be back to using the "offset 0" hack. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Poor performance using CTE

2012-11-14 Thread Andrew Dunstan
ESS CORRECTION') ; Or probably something way simpler but I just did this fairly quickly and mechanically cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Poor performance using CTE

2012-11-14 Thread Andrew Dunstan
u joining this table (or an extract from it) to itself? In any case, you could almost certainly recast it and have it run fast by first filtering on the tracking number. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subs

Re: [HACKERS] [PERFORM] pg_dump and thousands of schemas

2012-11-13 Thread Andrew Dunstan
t is. The word "primarily" is not just a noise word here. The fact that we have options to do other things doesn't mean that its primary design goal has changed. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your

Re: [PERFORM] Remote access to Postgresql slow

2012-09-15 Thread Andrew Barnham
Is your network link between server and client across the public internet? You need to check bandwidth and latency characteristics of your network. A simple test run following on server host and run it again on the client host. time psql [connect details] -c 'select now()' I access postgresql d

Re: [PERFORM] add column with default value is very slow

2012-09-11 Thread Andrew Dunstan
, indexes included. See the description of ACCESS EXCLUSIVE lock at <http://www.postgresql.org/docs/current/static/explicit-locking.html> cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgres

Re: [PERFORM] best practice to avoid table bloat?

2012-08-16 Thread Andrew Dunstan
during the day but less active during night I think that the only only thing where Postgres is weak, is in this area (table and index bloat). For some reason for the same amount of data every day postgres consume a little more. Check out pg_reorg. cheers andrew -- Sent via pgsql

Re: [PERFORM] Odd blocking (or massively latent) issue - even with EXPLAIN

2012-07-23 Thread Andrew Dunstan
this sort of behaviour on systems with massive catalogs (millions of tables and indexes). Could that be your problem? cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] queries are fast after dump->restore but slow again after some days dispite vacuum

2012-07-19 Thread Andrew Dunstan
On 07/19/2012 11:13 AM, Felix Scheicher wrote: Andrew Dunstan dunslane.net> writes: Try running CLUSTER on the relevant tables and see if it makes a difference. If it does you might want to look into using pg_reorg periodically. That worked like a charm! Many thanks. But how comes,

Re: [PERFORM] queries are fast after dump->restore but slow again after some days dispite vacuum

2012-07-19 Thread Andrew Dunstan
makes a difference. If it does you might want to look into using pg_reorg periodically. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] DELETE vs TRUNCATE explanation

2012-07-11 Thread Andrew Dunstan
method of test db setup. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Paged Query

2012-07-09 Thread Andrew Dunstan
, even if it only wants one page right now. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Sequencial scan in a JOIN

2012-06-05 Thread Andrew Jaimes
the default_statistics_target is set to 200, and I have run the analyze and reindex on these tables before writing the email. Andrew > Date: Tue, 5 Jun 2012 08:15:45 -0500 > From: stho...@optionshouse.com > To: andrewjai...@hotmail.com > CC: pgsql-performance@postgresql.org &

[PERFORM] Sequencial scan in a JOIN

2012-06-05 Thread Andrew Jaimes
0 loops=1)' ' Index Cond: ((activequeueid = 123456::numeric) AND (vstatus = 1) AND (ventrydate > 0))' 'Total runtime: 0.076 ms' This is the definition of the index : CREATE INDEX i08_a_activity ON a_activity USING btree (activequeueid , vstatus , ventrydate ); a_activity table has 1,216,134 rows Thanks in advance, Andrew

Re: [PERFORM] query optimization

2012-04-26 Thread Andrew Dunstan
ta is perfectly ordered in each table; on a less contrived example, it could well be a lot slower. It's not so terribly contrived, is it? It's common enough to have tables which are append-only and to join them by something that corresponds to the append order (serial field, timesta

Re: [PERFORM] scale up (postgresql vs mssql)

2012-04-13 Thread Andrew Dunstan
should show us your memory settings, among other things - especially shared_buffers, temp_buffers and work_mem. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Update join performance issues

2012-04-03 Thread Andrew Dunstan
whatever is in the from clause to the table being updated. You almost never need it repeated in the from clause. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Performance of SQL Function versus View

2012-04-03 Thread Andrew Dunstan
plans and times of queries nested in functions which can't easily be got otherwise. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] TCP Overhead on Local Loopback

2012-04-02 Thread Andrew Dunstan
On 04/01/2012 09:11 PM, Andrew Dunstan wrote: On 04/01/2012 08:29 PM, Claudio Freire wrote: On Sun, Apr 1, 2012 at 8:54 PM, Andrew Dunstan wrote: You could try using Unix domain socket and see if the performance improves. A relevant link: He said Windows. There are no Unix domain

Re: [PERFORM] TCP Overhead on Local Loopback

2012-04-01 Thread Andrew Dunstan
On 04/01/2012 08:29 PM, Claudio Freire wrote: On Sun, Apr 1, 2012 at 8:54 PM, Andrew Dunstan wrote: You could try using Unix domain socket and see if the performance improves. A relevant link: He said Windows. There are no Unix domain sockets on Windows. (And please don't top

Re: [PERFORM] TCP Overhead on Local Loopback

2012-04-01 Thread Andrew Dunstan
On 04/01/2012 06:01 PM, Andy wrote: You could try using Unix domain socket and see if the performance improves. A relevant link: He said Windows. There are no Unix domain sockets on Windows. (And please don't top-post) cheers andrew -- Sent via pgsql-performance mailing list (

Re: [PERFORM] Tablespaces on a raid configuration

2012-03-30 Thread Andrew Dunstan
the value if you were to have the tablespaces on different raid arrays. But what about on the same one? Not answering your question, but standard advice is not to use RAID 5 or 6, but RAID 10 for databases. Not sure if that still hold if you're using SSDs. cheers andrew -- Sent via

Re: [PERFORM] database slowdown while a lot of inserts occur

2012-03-29 Thread Andrew Dunstan
, if you're not using that already. It's not as efficient as COPY, but it's often a much less extensive change to the code. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [PERFORM] slow self-join query

2012-03-18 Thread Andrew Dunstan
tter, but that will change in the future. If all the rows have that value, then using the index would be silly. Postgres knows from the stats that ANALYZE calculates whether or not using an index is likely to be more efficient, and avoids doing so in cases where it isn't. cheers and

Re: [PERFORM] PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?

2012-03-01 Thread Andrew Dunstan
hence I *know* that 50G theoretical maximum will not be reached. Can the OP say that? I have no reason to think so. Hence I don't suggest 100M is OK on a 4G system. Well, obviously you need to know your workload. Nobody said otherwise. cheers andrew -- Sent via pgsql-performance mailing li

Re: [PERFORM] PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?

2012-03-01 Thread Andrew Dunstan
tens if not hundreds of Mb for any significantly sized database. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Very long deletion time on a 200 GB database

2012-02-27 Thread Andrew Dunstan
is proposed strategy. Or he could have tables partitioned by time and do the delete by just dropping partitions. There are numerous way he could get this to work. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscrip

Re: [PERFORM] Very long deletion time on a 200 GB database

2012-02-23 Thread Andrew Dunstan
ing records older than, say, 90 days, 60 days, 30 days. cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Query slow as Function

2012-02-18 Thread Andrew Dunstan
be hard to say much without a self-contained example to try. He's using EXECUTE ... USING. Does that plan with the used parameter? cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription:

Re: [PERFORM] Performance costs of various PL languages

2011-12-27 Thread Andrew Dunstan
V8, which is not yet ready for prime time, maps many common Postgres types into native JS types without the use of Input/Output functions, which means the conversion is very fast. It's work which could very well do with repeating for the other PL's. cheers andrew -- Sent v

Re: [PERFORM] Exploring memory usage

2011-12-27 Thread Andrew Dunstan
igh enough I kept a close eye on it (well, nagios did anway.) It depends on the workload. Your 16M setting would make many of my clients' systems slow to an absolute crawl for some queries, and they don't run into swap issues, because we've made educated guesses about u

[PERFORM] Query planner suggestion, for indexes with similar but not exact ordering.

2011-11-14 Thread Andrew Barnham
create indexes with match my order by fields perfectly; which is exactly what I am doing right now. But I thought that maybe it might be worth while considering looking at allowing some sort of in memory sort to be overlaid on an index if the statistics indicate that the sorts are very nearly ordered. Andrew

Re: [HACKERS] [PERFORM] Slow count(*) again...

2011-02-06 Thread Andrew Dunstan
On 02/04/2011 02:32 AM, da...@lang.hm wrote: when a copy command is issued, I assume that there is some indication of how much data is going to follow. No of course there isn't. How would we do that with a stream like STDIN? Read the code. cheers andrew -- Sent via

Re: [HACKERS] [PERFORM] Slow count(*) again...

2011-02-03 Thread Andrew Dunstan
"misunderestimate" more in the future when talking about planner errors. Might even try to slip it into the docs at some point in the future and see if anybody catches it. My wings take dream ... cheers andrew -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.or

Re: [PERFORM] Best replication solution?

2009-04-07 Thread Andrew Sullivan
-- were planned in from the beginning. Londiste aimed to be simpler, so it would be interesting to see whether those features could be incorporated without the same complication. A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.

Re: [PERFORM] Best replication solution?

2009-04-07 Thread Andrew Sullivan
duplicate key of slony > meta-data were as this was a duplicate key of one of my table's primary > key. This really ought to be impossible -- Slony just speaks standard SQL statements between nodes. But I won't say there's no possible bug there. Your best bet is the Slony lis

Re: [PERFORM] Best replication solution?

2009-04-06 Thread Andrew Sullivan
s also much handier as reference material than Slony's (which is, in my experience, a little hard to navigate if you don't already know the system pretty well). A -- Andrew Sullivan a...@crankycanuck.ca -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] inheritance, and plans

2009-02-08 Thread Andrew Gierth
>>>>> "Tom" == Tom Lane writes: > Andrew Gierth writes: >> Type-dependent selection of operators has already been done as >> part of parse analysis, no? And the domain -> base conversion is >> purely a relabelling, no? So what semantic

Re: [PERFORM] inheritance, and plans

2009-02-07 Thread Andrew Gierth
eady been done as part of parse analysis, no? And the domain -> base conversion is purely a relabelling, no? So what semantic change is possible as a result? -- Andrew (irc:RhodiumToad) -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to you

  1   2   3   4   5   >