LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Database array questions

Disclaimer: I am new to DB's.
I'm looking at creating a MySQL database to hold tests done on DUTs (each with a specific serial). In theory, each DUT undergoes 3 tests. Each test produces a 401x9 2D array of DBLs. I am not concerned with the write speed to the DB, but I do want to optimize the read of the DB (potentially may need to retrieve 1000+ of these 2D arrays as fast as possible). I have the DB Toolkit; using LV 8.5. Questions:
1. I have seen two different ways to save a 2D array in a DB mentioned: first, writing one row at a time with the DB Insert vi, resulting in a 2D array in a table (which is slow writing) or second, changing the 2D array to a variant and using the DB Insert vi, resulting in a single cell in a table. I know I can use other methods (parameterized vi, sql commands, user defined functions on the DB server, please do comment if you have found drastic performance increase with these methods), but of the two ways of storing a 2D array, can I read a 2D array from a table faster than reading a 2D array from a single cell? Whenever I need this data, I will read it all (i.e. I will never have to search for certain data within these individual 2D arrays)
2. I may have installed the 8.2.1 DB toolkit, because the Database Variant to Data vi/function does not drop onto the Block Diagram when I drag it from the palette, and the Help has ???. I assume this is because it just points to the normal Variant to Data, which in 8.5 is in a subpalette as compared to 8.2.1. Any quick way to fix this?
3. Any other general suggestions for a DB newbie? I've been trying to derive best practices from KB aritcles, this forum, and the web, but there is so much information and so many varying opinions I find it hard to narrow down best practices.
 
Michael
0 Kudos
Message 1 of 4
(2,937 Views)
 

Just found the answer to #2

http://digital.ni.com/public.nsf/allkb/CEE92D0FB321402586257193005DF125 

Michael

0 Kudos
Message 2 of 4
(2,932 Views)

Anyone have insight on question 1 above?

Michael

0 Kudos
Message 3 of 4
(2,900 Views)

Hi Miguel,

It looks like you are embarking on a very interesting project. Although you probably have seen many of the following documents, I've linked a few to get you started.

Discussion forum using LabVIEW to read from tables

As far as your first question, I would suggest trying out both methods with simple code and testing with a small amount of values to determine  which one will be the fastest.

Good luck with your project!

 
Amanda Howard
Americas Services and Support Recruiting Manager
National Instruments
0 Kudos
Message 4 of 4
(2,879 Views)