[GENERAL] About the tps explanation of pgbench, please help

2014-11-18 Thread Yanrui Hu
I am working on a evaluation to put db client outside the datacenter and to know how the network impact on the business. After several round of testing, I have a question regarding to the two tps result in stress output. Test A: Client and DB server exist in same AWS datacenter. transaction type:

Re: [GENERAL] About the tps explanation of pgbench, please help

2014-11-18 Thread John R Pierce
On 11/18/2014 12:33 AM, Yanrui Hu wrote: the tps excluding connections establishing should be very close, right? Because the database is same and capability is same only network latency is different. that greatly latency is added to every sql command you send and get results from. why

Re: [HACKERS] [GENERAL] Performance issue with libpq prepared queries on 9.3 and 9.4

2014-11-18 Thread Alban Hertroys
On 17 November 2014 22:27, Tom Lane t...@sss.pgh.pa.us wrote: Another idea that occurred to me is to run a planning cycle in which the actual parameter values are made available to the planner, but as estimates not hard constants (this facility already exists, it's just not being used by

Re: [GENERAL] About the tps explanation of pgbench, please help

2014-11-18 Thread Yanrui Hu
It the connection establishing means socket connect? If so, that 's the only different for my case A and B. So the result of exclude connection establishing should be similar, right? My overall test is to fingure out the what's the impact if my client access db server from out side datacenter(

Re: [GENERAL] About the tps explanation of pgbench, please help

2014-11-18 Thread Francisco Olarte
Hi Yanrui: On Tue, Nov 18, 2014 at 10:46 AM, Yanrui Hu y...@appannie.com wrote: It the connection establishing means socket connect? If so, that 's the only different for my case A and B. So the result of exclude connection establishing should be similar, right? When you connect to the

Re: [GENERAL] String searching

2014-11-18 Thread Albe Laurenz
Jonathan Vanasco wrote: On Nov 17, 2014, at 12:55 PM, Robert DiFalco wrote: SELECT * FROM MyTable WHERE upper(FullName) LIKE upper('%John%'); That said, which would be the best extension module to use? A gist index on the uppercased column? Or something else? Thanks! Performance

Re: [GENERAL] About the tps explanation of pgbench, please help

2014-11-18 Thread Adrian Klaver
On 11/18/2014 12:33 AM, Yanrui Hu wrote: I am working on a evaluation to put db client outside the datacenter and to know how the network impact on the business. After several round of testing, I have a question regarding to the two tps result in stress output. Test A: Client and DB server

Re: [GENERAL] String searching

2014-11-18 Thread Andy Colson
On 11/17/2014 7:54 PM, Jonathan Vanasco wrote: On Nov 17, 2014, at 12:55 PM, Robert DiFalco wrote: SELECT * FROM MyTable WHERE upper(FullName) LIKE upper('%John%'); That said, which would be the best extension module to use? A gist index on the uppercased column? Or something else?

Re: [GENERAL] String searching

2014-11-18 Thread Jonathan Vanasco
On Nov 18, 2014, at 7:38 AM, Albe Laurenz wrote: That index wouldn't help with the query at all. If you really need a full substring search (i.e., you want to find howardjohnson), the only thing that could help are trigram indexes. I stand corrected. I ran a sample query on my test

Re: [GENERAL] String searching

2014-11-18 Thread Robert DiFalco
Thanks everyone. Either I'm not that smart or I am working on too many things at once (or both) but making Full Text work seems super tedious. I just have a single VARCHAR field for name, so the full name William S. Burroughs is a single row and column. I want to as simply as possible have the

Re: [GENERAL] String searching

2014-11-18 Thread Jonathan Vanasco
On Nov 18, 2014, at 11:49 AM, Robert DiFalco wrote: As far as I can tell, the trigram extension would be the easiest way to implement this. It looks like I wouldn't need to mess with vectors, etc. It would just look like a standard index and query, right? It seems that if I need something

Re: [GENERAL] String searching

2014-11-18 Thread Vick Khera
On Tue, Nov 18, 2014 at 11:49 AM, Robert DiFalco robert.difa...@gmail.com wrote: Either I'm not that smart or I am working on too many things at once (or both) but making Full Text work seems super tedious. I just have a single VARCHAR field for name, so the full name William S. Burroughs is a

Re: [GENERAL] String searching

2014-11-18 Thread Kevin Grittner
Robert DiFalco robert.difa...@gmail.com wrote: I just have a single VARCHAR field for name, so the full name William S. Burroughs is a single row and column. I want to as simply as possible have the ability to search find this record with Will, will, Burr, burroughs, etc. As far as I can

[GENERAL] issue with double ordering in a wrapped distinct

2014-11-18 Thread Jonathan Vanasco
I have a particular query that returns resultset of 45k rows out of a large resultset (pg 9.3 and 9.1) It's a many 2 many query, where Im trying to search for Bar based on attributes in a linked Foo. I tweaked the indexes, optimized the query, and got it down an acceptable speed around

[GENERAL] how to delay sync by a set time, hour or day?

2014-11-18 Thread John Smith
i want to setup a standby slave that listens 24/7 but only syncs when told to. setting pause_at_recovery_target (boolean) in recovery.conf on slave doesn't help since docs say it only specifies whether recovery should pause when the recovery target is reached. also recovery_target = 'immediate'

Re: [GENERAL] issue with double ordering in a wrapped distinct

2014-11-18 Thread Tom Lane
Jonathan Vanasco postg...@2xlp.com writes: This is what I don't understand -- notice the two order_by calls. If i run this with an inner and outer order_by, I get ~305ms. (I don't think I need both, but I wasn't sure if ordering is kept from a subselect ) If i run this with

Re: [GENERAL] issue with double ordering in a wrapped distinct

2014-11-18 Thread David G Johnston
Jonathan Vanasco-7 wrote I have a particular query that returns resultset of 45k rows out of a large resultset (pg 9.3 and 9.1) It's a many 2 many query, where Im trying to search for Bar based on attributes in a linked Foo. I tweaked the indexes, optimized the query, and got it down an

[GENERAL] Linuxfest 2015 Call for Papers

2014-11-18 Thread Joshua D. Drake
Hello, Forwarding this because they are having a dedicated PostgreSQL track put on by PgUS. I hope all will submit papers. This is a great conference of about 1500. It is 100% non-profit and is a great opportunity to reach out! Forwarded Message Subject:[Blug-list]

Re: [GENERAL] issue with double ordering in a wrapped distinct

2014-11-18 Thread Jonathan Vanasco
On Nov 18, 2014, at 6:43 PM, Tom Lane wrote: but as for why it gets a much worse plan after flattening --- insufficient data. Thanks. I'll run some test cases in the morning and post the full queries matched with ANALYZE EXPLAIN. This is just puzzling to me. I was hoping there might be a

Re: [GENERAL] About the tps explanation of pgbench, please help

2014-11-18 Thread Yanrui Hu
Thanks Francisco, I am partly understanding your explain. the including connection establish case means the db connection not only socket connection, the excluding connection establish case include many db query and more depends on socket latency, right? And what's your suggestion on my testing ?

Re: [GENERAL] About the tps explanation of pgbench, please help

2014-11-18 Thread Yanrui Hu
Adrian, I saw that in two case, one is 54502 transactions and the other is 13966 but that is caused by capacity decrease. And fps is transaction per second, so it's not the transactions but transaction per second, so I don't think the total transactions different has any problem. Please point if

Re: [GENERAL] About the tps explanation of pgbench, please help

2014-11-18 Thread Adrian Klaver
On 11/18/2014 05:53 PM, Yanrui Hu wrote: Adrian, I saw that in two case, one is 54502 transactions and the other is 13966 but that is caused by capacity decrease. And fps is transaction per second, so it's not the transactions but transaction per second, so I don't think the total transactions

Re: [GENERAL] how to delay sync by a set time, hour or day?

2014-11-18 Thread Michael Paquier
On Wed, Nov 19, 2014 at 8:37 AM, John Smith jayzee.sm...@gmail.com wrote: i want to setup a standby slave that listens 24/7 but only syncs when told to. setting pause_at_recovery_target (boolean) in recovery.conf on slave doesn't help since docs say it only specifies whether recovery should

Re: [GENERAL] About the tps explanation of pgbench, please help

2014-11-18 Thread Yanrui Hu
Adrian, I understand you about the tps explain. What I would like to know is how much the network changed impact on the tps changes in two cases. On Wed, Nov 19, 2014 at 10:58 AM, Adrian Klaver adrian.kla...@aklaver.com wrote: On 11/18/2014 05:53 PM, Yanrui Hu wrote: Adrian, I saw that in

Re: [GENERAL] About the tps explanation of pgbench, please help

2014-11-18 Thread John R Pierce
On 11/18/2014 5:48 PM, Yanrui Hu wrote: Based on your mail, my senario is more like excluding connection establish case, right? So the network change make the capacity decrease to 1/5 (204-42). The network change impact the system so much! have you measured the packet latency, with ping or

Re: [GENERAL] About the tps explanation of pgbench, please help

2014-11-18 Thread John R Pierce
On 11/18/2014 9:36 PM, Yanrui Hu wrote: What I would like to know is how much the network changed impact on the tps changes in two cases. you just measured that. -- john r pierce 37N 122W somewhere on the middle of the left coast -- Sent via