Le 06/01/2015 17:29, Jorge Carrión a écrit :
> I find the old code that shows the slowly of database objects in loops.
> Just trying to get de length of all fields of all tables in a database:
>
>   For Each tbl In hc.Tables
>          Print tbl.Name
>          For Each fld In tbl.fields
>              awidths.Add(fld.Length)
>          Next
>    Next
>
> I try it with two databases:
>
>   A SQLite database with 16 tables and 127 fields.
>   A MySQL database with  6 tabñes amd 82 fields.
>
> The result is attahed in two images.
>
> With SQLite is not a bad result, but in MySQL is a disaster...
> It seems like gambas has to "travel thru the web" in order to get the
> information of each field of each table...
> I use, then, the "show columns for tablename" instruction in MySQL... and
> the PRAGMA fields_info in SQLite that does the work at once... but PRAGMA
> doesn't work any more.
> Looking this test is not a big issue: I can use different way to each
> database type, but PRAGMA is a must-work on SQLite, I think.
>
> Regards
>

Metadata information is not part of the SQL "standard", so each database 
behaves differently.

As for the use of PRAGMA, it never worked before. It's a more global 
change that you will get in the next revision.

Regards,

-- 
Benoît Minisini

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to