LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Has anybody had any experience using either mySQL or postgreSQL?

I am currently looking at a project requiring database integration and in addition to the usual suspects (Oracle, SQL Server) I am also interested in mySQL and postgreSQL. Advantages? Disadvantages? Has anybody used these with LV--especially to store BLOBS?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 1 of 12
(5,951 Views)
Mike,

Here are the main differences...

MySQL is licensed under the GPL, but for about $400 you can buy a comercial license.

PostgreSQL is licensed under the BDS, which means you don't ever have to pay to use it.

Both have ODBC drivers (myODBC and psqlODBC), so talking to them from LabVIEW is a no-brainer.

PostgreSQL has more features like store proceedures and subqueries, so if you have complex data processing, you can handle them on the server side.

MySQL has fewer features and is probably simpler to administer, but I _think_ that the next version might have subquery capabilities. It's also faster for simple commands.

As far as BLOBs are concerned, here's what I dug up:

"""
In Postgres, Large Objects are very special beasties. You need
to create them using lo_create function and store the result of the function - OID - in a regular table. Later you can manipulate the LOB using the OID and other functions - lo_read/lo_write, etc. Large object support is broken in Postgres - pg_dump cannot dump LOBs; you need to develop your own backup mechanism. Tthe team is working on implementing large rows; this will replace current LOB support.
"""

"""
In MySQL, text and binary LOBs are just fields in the table. Nothing special - just INSERT, UPDATE, SELECT and DELETE it the way you like. There are some limitations on indexing and applying functions to these fields.
"""

I hope this is enough to get you started. I suggest you STFW (Search the Fine Web). You will get many results from "MySQL vs PostgreSQL".

Here are a couple that I found.

http://phd.pp.ru/Software/SQL/PostgreSQL-vs-MySQL.html

http://www.webtechniques.com/archives/2001/09/jepson/
Message 2 of 12
(5,951 Views)
Hi Mike,

I've used both mySQL and postgresql. Postrgesql has really improved in the last 3 years and it is currently my favored database (as it tends to be more powerful/feature complete than mySQL). I've also used LabVIEW for Windows Database Connectivity to use a postgresql running on a Linux box. I did not run into any issues, although it was not exhaustivly tested either.

I'm really suprised (in a good way) that you are considering all four of these databases as they require a wide range of differing skill sets. mySQL is increadibly easy to setup, understand and use. Oracle, all of it's power comes at a price and required me to do a lot of studying (and a couple of re-installs) to get it right.

Good luck!
0 Kudos
Message 3 of 12
(5,951 Views)

Hi,

  Im having problem to conect in postgre server .. Someone can help me pls ?

 This is the error msg ...

 

 

"The server doesn't accept connections: the connection library reports
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?  "

 

Thx 😃
0 Kudos
Message 4 of 12
(5,246 Views)

Jim Kring wrote:
Mike,
---x-snip-x---
MySQL is licensed under the GPL, but for about $400 you can buy a comercial license.
---x-snip-x---

I don't think you need a commercial license to use MySQL commercially.  Just if you want some support.

 

I like MySQL, but have never used it with LabVIEW.  MySQL does have some decent administration tools available for it.  MySQL is also very developer friendly.  I think you can get the whole thing running on a USB stick.  I remember when I did WAMP (Windows+Apache+MySQL+PHP) development, I had the whole package installed on a USB flash drive and could run it on my work computer or on my home computer.  I thought that was fantastic.

0 Kudos
Message 5 of 12
(5,237 Views)

U need a license of MySQL if u use it in a enterprise for example ...

 

PostGreSQL i dont think that is needed .. u can just use it when and where u want ...  

0 Kudos
Message 6 of 12
(5,229 Views)
I already figured out my problem with the conection ... dunno how remove it from there ...
0 Kudos
Message 7 of 12
(5,228 Views)
We are currently using mySQL with LabVIEW and TestStand. It has been working well for us. I sat in on a webinar that was comparing mySQL and postgres and a couple of interesting pieces of information were that in general, mySQL was faster and better for an application that was primarily doing data retrieval. Postgres was not as fast however its database updates were more secure and fault tolerant. MySQL is also more widely used so there tend to be more online resources available.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 8 of 12
(5,217 Views)

I have trouble with my Labview Project working at 24/7 mode with PostGRE. The problem consists that my LV project's memory usage increases when my program have insert every new record in PostGRE's table.

 

Now I've no any possibilities to change this situation, because first of all LabVIEW is not intended for 24/7 mode. PostGRE is working very well and intended for 24/7 mode.

 

Is anybody help me to solve this growth allocating memory problem with every new record in PostGRE's table ???

 

Please dear colleagues

0 Kudos
Message 9 of 12
(4,149 Views)

Hi Mike,

 

Your OP was 15 years ago!  I thought this might still be relevant here, rather than starting a new thread.

I've recently updated my PostgreSQL and MySQL installations, and ran a quick performance comparison with the example code attached below.

The PostgreSQL did inserts at a rate of 1000 tuples in 1400 seconds (terrible) and MySQL at a rate of 1000 per 29 seconds.  Something is clearly wrong with the first setup, but I would have expected better performance than 30-40 records per second with MySQL server running on localhost (Xeon processor).

ODBC driver details: PSQLODBC30A.DLL and MYODBC5A.DLL, downloaded in Feb 2018 from PostgreSQL Global Development Group and Oracle Corp., respectively.

Is there anything obviously wrong with the code?  The connection configurations (see text in vi) are exactly the same except for driver name, port & login credentials.  I hope to get better performance than this, and it would be nice to have the option to use postgreSQL, which is ruled out by the awful results above.

 

Cheers,

Ted

0 Kudos
Message 10 of 12
(3,227 Views)