Re: [PERFORM] COPY with high # of clients, partitioned table locking issues?

2011-03-31 Thread Greg Smith
On 03/30/2011 04:56 PM, Strange, John W wrote: [ 2011-03-30 15:54:55.886 EDT ] 14405 [local] asgprod:4d938288.3845 LOG: process 14405 still waiting for ExclusiveLock on extension of relation 470273 of database 16384 after 5001.894 ms [ 2011-03-30 15:54:56.015 EDT ] 7294 [local] asgprod:4d93893

Re: [PERFORM] good old VACUUM FULL

2011-03-31 Thread Craig Ringer
On 23/03/2011 12:24 PM, Chris wrote: You'll need to reindex that table now - vacuum full can bloat your indexes which will affect your other queries. It doesn't seem to matter much for a one-off. Index bloat problems have mainly been encountered where people are running VACUUM FULL as part of

[PERFORM] table contraints checks only happen in planner phase

2011-03-31 Thread Joseph Shraibman
Is there a reason that when executing queries the table constraints are only checked during planning and not execution? I end up making 2 round trips to the database to get around this. All of these queries should produce the same output: [local]:playpen=> explain analyze select count(*) from

[PERFORM] index usage on queries on inherited tables

2011-03-31 Thread Joseph Shraibman
When I do a query on a table with child tables on certain queries pg uses indexes and on others it doesn't. Why does this happen? For example: [local]:playpen=> explain analyze select * from vis where id > 10747 ; QUERY PLAN

Re: [PERFORM] Slow deleting tables with foreign keys

2011-03-31 Thread Jeremy Palmer
Hi Bob, The "table_version.revision" ("revision" is the same) table has a primary key on id because of the PK "revision_pkey". Actually at the moment there are only two rows in the table table_version.revision! Thanks for the tips about the indexes. I'm still in the development and tuning proc

Re: [PERFORM] Calculating 95th percentiles

2011-03-31 Thread Landreville
On Sat, Mar 5, 2011 at 7:34 PM, marcin mank wrote: > Is this fast enough on a slave: > > > with deltas as (select * from get_delta_table(...)), > p95 as(select round(count(volume_id) * 0.95) as p95v from deltas) > select > (select in_rate from deltas, p95 where > in_rate_order = p95v), > (select o

[PERFORM] Why it is using/not using index scan?

2011-03-31 Thread Laszlo Nagy
For this query: select pp.id,pp.product_id,pp.selling_site_id,pp.asin from product_price pp where (pp.asin is not null and pp.asin<>'') and (pp.upload_status_id<>1) and pp.selling_site_id in (8,7,35,6,9) and (pp.last_od < 'now'::timestamp - '1 week'::interval ) limit 5000 Query plan is: "Limit

Re: [PERFORM] COPY with high # of clients, partitioned table locking issues?

2011-03-31 Thread Maciek Sakrejda
> But you are using stdin for COPY! The best way is use files. I've never heard this before, and I don't see how reading from files could possibly help. Can you clarify? --- Maciek Sakrejda | System Architect | Truviso 1065 E. Hillsdale Blvd., Suite 215 Foster City, CA 94404 (650) 242-3500 Main w

Re: [PERFORM] Slow deleting tables with foreign keys

2011-03-31 Thread Bob Lunney
Jeremy, Does table_revision have a unique index on id? Also, I doubt these two indexes ever get used: CREATE INDEX idx_crs_action_expired_created ON table_version.bde_crs_action_revision USING btree (_revision_expired, _revision_created); CREATE INDEX idx_crs_action_expired_key ON tabl

Re: [PERFORM] COPY with high # of clients, partitioned table locking issues?

2011-03-31 Thread Emanuel Calvo
Your message was dropped into my Spam lable :S 2011/3/30 Strange, John W : > Just some information on our setup: > > - HP DL585 G6 > - 4 x AMD Opteron 8435 (24 cores) > - 256GB RAM > - 2 FusionIO 640GB PCI-SSD (RAID0) > - dual 10GB ethernet. > > - we have several tables that we store calculated v