Re: [GENERAL] Generating sample data

2016-12-28 Thread Martijn Tonies (Upscene Productions)
Hi, Not open source, but also not pricey (IMO): Advanced Data Generator. http://www.upscene.com/advanced_data_generator/ Generates e-mail addresses, street names, first & last names, company names, complex relationships etc. And yes, this is our product. ;) With regards, Martijn Tonies Upscen

[GENERAL] Performance PLV8 vs PLPGSQL

2016-12-28 Thread Tim Uckun
I have seen various links on the internet which indicate that PLV8 is significantly faster than PL-PGSQL sometimes an order of magnitude faster. Is this uniformly true or is it just in certain circumstances? Is there any benefit to choosing PL-PGSQL? Is there work going on to make PL-PGSQL more

Re: [GENERAL] Performance PLV8 vs PLPGSQL

2016-12-28 Thread Pavel Stehule
Hi 2016-12-28 10:15 GMT+01:00 Tim Uckun : > I have seen various links on the internet which indicate that PLV8 is > significantly faster than PL-PGSQL sometimes an order of magnitude faster. > > Is this uniformly true or is it just in certain circumstances? > It depends on usage > > Is there a

Re: [GENERAL] Performance PLV8 vs PLPGSQL

2016-12-28 Thread Pavel Stehule
2016-12-28 10:46 GMT+01:00 Pavel Stehule : > Hi > > 2016-12-28 10:15 GMT+01:00 Tim Uckun : > >> I have seen various links on the internet which indicate that PLV8 is >> significantly faster than PL-PGSQL sometimes an order of magnitude faster. >> >> Is this uniformly true or is it just in certain

Re: [GENERAL] Generating sample data

2016-12-28 Thread Rich Shepard
On Wed, 28 Dec 2016, Martijn Tonies (Upscene Productions) wrote: Not open source, but also not pricey (IMO): Advanced Data Generator. http://www.upscene.com/advanced_data_generator/ Generates e-mail addresses, street names, first & last names, company names, complex relationships etc. And yes,

Re: [GENERAL] Performance PLV8 vs PLPGSQL

2016-12-28 Thread Mike Sofen
From: Tim Uckun I have seen various links on the internet which indicate that PLV8 is significantly faster than PL-PGSQL sometimes an order of magnitude faster. Is there any benefit to choosing PL-PGSQL? I can’t speak to PLV8. However, I can speak to plpgsql, and s

Re: [GENERAL] LYDB: What advice about stored procedures and other server side code?

2016-12-28 Thread Christoph Moench-Tegeder
## Guyren Howe (guy...@gmail.com): > I am inclined to advise folks to use PL/V8 on Postgres, because it is > a reasonable language, everyone knows it, it has good string functions, > decent performance and it tends to be installed everywhere (in particular, > Amazon RDF offers it). I'd be careful

Re: [GENERAL] LYDB: What advice about stored procedures and other server side code?

2016-12-28 Thread Pavel Stehule
2016-12-28 16:12 GMT+01:00 Christoph Moench-Tegeder : > ## Guyren Howe (guy...@gmail.com): > > > I am inclined to advise folks to use PL/V8 on Postgres, because it is > > a reasonable language, everyone knows it, it has good string functions, > > decent performance and it tends to be installed eve

Re: [GENERAL] LYDB: What advice about stored procedures and other server side code?

2016-12-28 Thread Mike Sofen
|From: Christoph Moench-Tegeder |Initially, running code in your database can make life easier for the developers |(ise pgTap for testing, pl/profiler and pl/debugger, etc.). But once you have to |change your schema, the hurt begins: |you'll need downtime for that, or you'll have to deal with the

[GENERAL] Indexes and loops

2016-12-28 Thread Арсен Арутюнян
Hello. I have a few questions: 1)  JobStatusTest1 function has only one request and JobStatusTest2 function has as many as six requests. Why function JobStatusTest2 is faster?  JobStatusTest1 : 981.596 ms JobStatusTest2 : 849.133 ms 2) Two functions JobStatusTest3 and JobStatusTest4 perform the

[GENERAL] Securing Information

2016-12-28 Thread Chris Weekes
Hello Sir or Madam: I wanted to install PostgreSQL v 9.6 on a machine that may stand alone and or be part of a network sharing hospital data. I was wondering what steps if any need to be taken to ensure that the patient and operational data is secure on a machine and or across the network. Thank

Re: [GENERAL] Indexes and loops

2016-12-28 Thread Pavel Stehule
Hi 2016-12-27 19:05 GMT+01:00 Арсен Арутюнян : > Hello. > > I have a few questions: > > 1) JobStatusTest1 function has only one request and JobStatusTest2 > function has as many as six requests. > > Why function JobStatusTest2 is faster? > > > JobStatusTest1 : 981.596 ms > > JobStatusTest2 : 849

Re: [GENERAL] Securing Information

2016-12-28 Thread Rich Shepard
On Tue, 27 Dec 2016, Chris Weekes wrote: I was wondering what steps if any need to be taken to ensure that the patient and operational data is secure on a machine and or across the network. Chris, I'm far from an expert but until more knowledgeable folks respond I'll offer a couple of quick

Re: [GENERAL] Performance PLV8 vs PLPGSQL

2016-12-28 Thread Jan de Visser
On Wednesday, December 28, 2016 6:02:51 AM EST Mike Sofen wrote: > the natural lashup of plpgsql to postgres (I liked Alban’s term, > “impedance”), is a key aspect. Not to deprive Alban of any of his credit, but the term "impedance mismatch" is at least 25 year old; as far as I know it was coined

[GENERAL] Row value expression much faster than equivalent OR clauses

2016-12-28 Thread Steven Grimm
A library my application is using does a "scan a batch at a time" loop over a table of events, keeping track of its last position so it can start the next query in the right place. SELECT eventIdentifier, aggregateIdentifier, sequenceNumber, timeStamp, payloadType, payloadRevision, payloa

Re: [GENERAL] Securing Information

2016-12-28 Thread Melvin Davidson
On Wed, Dec 28, 2016 at 11:49 AM, Rich Shepard wrote: > On Tue, 27 Dec 2016, Chris Weekes wrote: > > I was wondering what steps if any need to be taken to ensure that the >> patient and operational data is secure on a machine and or across the >> network. >> > > Chris, > > I'm far from an exper

Re: [GENERAL] LYDB: What advice about stored procedures and other server side code?

2016-12-28 Thread Christoph Moench-Tegeder
## Mike Sofen (mso...@runbox.com): > I look at this from the opposite direction: with a stable database > API (via stored procs), I can change the schema and logic within the > procs without causing any app code breakage…the app tier is completely > insulated from those changes – that’s worth a lo

Re: [GENERAL] LYDB: What advice about stored procedures and other server side code?

2016-12-28 Thread Karsten Hilbert
> Many applications are not designed to have a "stable" database API. It seems OP is arguing they should. Regards, Karsten -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Performance PLV8 vs PLPGSQL

2016-12-28 Thread Francisco Olarte
On Wed, Dec 28, 2016 at 5:53 PM, Jan de Visser wrote: > .but the term "impedance mismatch" > is at least 25 year old; Much older, I was told it in class at least 32 years ago. > as far as I know it was coined _Borrowed_ from electrical engineering / communication techs. It is used to highl

Re: [GENERAL] Securing Information

2016-12-28 Thread Adrian Klaver
On 12/27/2016 11:59 AM, Chris Weekes wrote: Hello Sir or Madam: I wanted to install PostgreSQL v 9.6 on a machine that may stand alone and or be part of a network sharing hospital data. I was wondering what steps if any need to be taken to ensure that the patient and operational data is secure

Re: [GENERAL] Er Data Modeller for PostgreSQL

2016-12-28 Thread Rich Shepard
On Fri, 23 Dec 2016, Thomas Kellerer wrote: Scott Mead just blogged about using SchemaSpy with Postgres Thomas, I've spent the past two days without success trying to get schemaSpy running here and have found a solution that works quickly and easily: dbeaver . Yes,

Re: [GENERAL] Er Data Modeller for PostgreSQL

2016-12-28 Thread Adrian Klaver
On 12/28/2016 03:24 PM, Rich Shepard wrote: On Fri, 23 Dec 2016, Thomas Kellerer wrote: Scott Mead just blogged about using SchemaSpy with Postgres Thomas, I've spent the past two days without success trying to get schemaSpy running here An example from my machine that works: aklaver@ti

Re: [GENERAL] Er Data Modeller for PostgreSQL

2016-12-28 Thread Rich Shepard
On Wed, 28 Dec 2016, Adrian Klaver wrote: An example from my machine that works: aklaver@tito:~/bin> java -jar schemaSpy_5.0.0.jar -t pgsql -s public -u postgres -db production -host localhost -dp /home/aklaver/bin/postgresql-9.4.1212.jre6.jar -o s_spy Adrian, That's interesting. I spec

Re: [GENERAL] Securing Information

2016-12-28 Thread jesusthefrog
If you're storing HIPAA data and/or PII then just make sure it's encrypted at rest. We just did this at my workplace by using full disk encryption on the disk which stores the DB files. That may not be the best solution, but it appears to work well enough. -- -BEGIN GEEK CODE BLOCK- Ver

Re: [GENERAL] Securing Information

2016-12-28 Thread John R Pierce
On 12/28/2016 4:16 PM, jesusthefrog wrote: If you're storing HIPAA data and/or PII then just make sure it's encrypted at rest. We just did this at my workplace by using full disk encryption on the disk which stores the DB files. That may not be the best solution, but it appears to work well e

Re: [GENERAL] Securing Information

2016-12-28 Thread jesusthefrog
True. In our environment we have other layers to deal with network security which covers us for encryption of a data as it's transmitted, and you definitely should do that, but that's not something a DBA would normally be concerned with. And given that he said that the machine may be standalone, I

[GENERAL] Help with Trigger

2016-12-28 Thread Clifford Snow
I'm trying to write a trigger (my first) to update another table if the user_id is new. But I'm getting a index exception that the user_id already exists. I'm picking up data from another feed which gives provides me with changes to the main database. what I have is CREATE OR REPLACE FUNCTION add

Re: [GENERAL] Help with Trigger

2016-12-28 Thread Adrian Klaver
On 12/28/2016 07:06 PM, Clifford Snow wrote: I'm trying to write a trigger (my first) to update another table if the user_id is new. But I'm getting a index exception that the user_id What is the actual error message? already exists. I'm picking up data from another feed which gives provides

Re: [GENERAL] Help with Trigger

2016-12-28 Thread Clifford Snow
Thank you for your suggestion which solved the problem. Much better solution that what I was trying to accomplish. Much smaller table to query since it only has one entry per user. Clifford On Wed, Dec 28, 2016 at 8:12 PM, Adrian Klaver wrote: > On 12/28/2016 07:06 PM, Clifford Snow wrote: > >>

[GENERAL] vacuumdb --analyze-only scans all pages?

2016-12-28 Thread Gerhard Wiesinger
Hello, PostgreSQl 9.6.1: after a pg_dump/restore procedure it scans all pages (at least for some of the tables, analyze-only switch is specified). I would expect that only the sample rows are scanned. "log_details": scanned 2133350 of 2133350 pages vacuumdb --analyze-only --all --verbose IN