Re: [PERFORM] anti-join chosen even when slower than old plan

2011-01-20 Thread Cédric Villemain
2011/1/19 Bruce Momjian : > Tom Lane wrote: >> Robert Haas writes: >> > On Fri, Nov 12, 2010 at 4:15 AM, Cédric Villemain >> > wrote: >> >>> I wondering if we could do something with a formula like 3 * >> >>> amount_of_data_to_read / (3 * amount_of_data_to_read + >> >>> effective_cache_size) = pe

Re: [PERFORM] anti-join chosen even when slower than old plan

2011-01-20 Thread Robert Haas
On Thu, Jan 20, 2011 at 4:17 AM, Cédric Villemain wrote: >>> I think his point is that we already have a proven formula >>> (Mackert-Lohmann) and shouldn't be inventing a new one out of thin air. >>> The problem is to figure out what numbers to apply the M-L formula to. >>> >>> I've been thinking

Re: [PERFORM] Migrating to Postgresql and new hardware

2011-01-20 Thread Andy Colson
On 1/19/2011 6:42 PM, Craig Ringer wrote: On 01/19/2011 05:09 PM, Lars wrote: Thanks for the reply! As others have mentioned, how are you going to be doing your "shards"? Hmm... shards might not have been a good word to describe it. I'll paste what I wrote in another reply: I used sharding a

Re: [PERFORM] the XID question

2011-01-20 Thread Charles.Hou
On 1月20日, 上午6時46分, g...@2ndquadrant.com (Greg Smith) wrote: > Kevin Grittner wrote: > > Or just test it in psql.  BEGIN, run your query, look at pg_locks. > > If an xid has been assigned, you'll see it there in the > > transactionid column.  You can easily satisfy yourself which > > statements grab

Re: [PERFORM] Running PostgreSQL as fast as possible no matter the consequences

2011-01-20 Thread Robert Haas
On Wed, Jan 19, 2011 at 12:07 PM, Bruce Momjian wrote: > Chris Browne wrote: >> gentosa...@gmail.com (A B) writes: >> > If you just wanted PostgreSQL to go as fast as possible WITHOUT any >> > care for your data (you accept 100% dataloss and datacorruption if any >> > error should occur), what set

Re: [PERFORM] Migrating to Postgresql and new hardware

2011-01-20 Thread Scott Marlowe
On Thu, Jan 20, 2011 at 7:48 AM, Andy Colson wrote: > Or... PG is just so good we've never had to use more than one database > server!  :-) Hehe, while you can do a lot with one server, there are some scenarios where sharding is the answer. I have a horror story about not sharding when we shoul

Re: [PERFORM] anti-join chosen even when slower than old plan

2011-01-20 Thread Cédric Villemain
2011/1/20 Robert Haas : > On Thu, Jan 20, 2011 at 4:17 AM, Cédric Villemain > wrote: I think his point is that we already have a proven formula (Mackert-Lohmann) and shouldn't be inventing a new one out of thin air. The problem is to figure out what numbers to apply the M-L formula

Re: [PERFORM] anti-join chosen even when slower than old plan

2011-01-20 Thread Cédric Villemain
2011/1/19 Bruce Momjian : > Robert Haas wrote: >> On Thu, Nov 11, 2010 at 2:35 PM, Tom Lane wrote: >> > Robert Haas writes: >> >> Yeah. ?For Kevin's case, it seems like we want the caching percentage >> >> to vary not so much based on which table we're hitting at the moment >> >> but on how much

Re: [PERFORM] the XID question

2011-01-20 Thread Kevin Grittner
"Charles.Hou" wrote: > my postgresql version is 8.1.3 Ouch! That's getting pretty old; I hope it's not on Windows. http://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policy http://www.postgresql.org/about/news.865 > you means the newer version has a virtual transaction ID. and >

[PERFORM] copy command and blobs

2011-01-20 Thread Madhu Ramachandran
hello, i have a table with OID column.. I want to use the copy command to insert bunch of rows (1 million). but iam unable to specify the correct format for the oid type (i have .jpg files to be stored in this column).. I tried giving the path to the file, lo_import('pathto file').. appreciate an

Re: [PERFORM] copy command and blobs

2011-01-20 Thread Mladen Gogala
Madhu Ramachandran wrote: hello, i have a table with OID column.. I want to use the copy command to insert bunch of rows (1 million). but iam unable to specify the correct format for the oid type (i have .jpg files to be stored in this column).. Huh? oid is a keyword, an automatically generate

Re: [PERFORM] copy command and blobs

2011-01-20 Thread Tom Lane
Mladen Gogala writes: > Madhu Ramachandran wrote: >> i have a table with OID column.. I want to use the copy command to >> insert bunch of rows (1 million). >> but iam unable to specify the correct format for the oid type (i have >> .jpg files to be stored in this column).. > Huh? oid is a keyw