[Haskell-cafe] mysql (hsql-mysql-1.7) on Linux with GHC 8.3 -
jgoerzen at complete.org
Thu Oct 2 19:41:47 EDT 2008
On Fri, Oct 03, 2008 at 12:14:18AM +0300, Anton Tayanovskyy wrote:
> On Thu, Oct 2, 2008 at 6:39 PM, Duncan Coutts
> <duncan.coutts at worc.ox.ac.uk> wrote:
> > The problem here really is that HSQL has no maintainer and has not been
> > updated for about two years if my memory serves me correctly. Some
> > distros, Fedora, Gentoo etc have patched HSQL to keep it working with
> > ghc-6.8.
> I see. True, it was updated Apr 9, 2007. Well, it's a pity that
> neither Hackage nor the Haskell wiki mentions those patches.
> > The answer is to find someone to maintain it, take over maintenance
> > yourself or switch to another lib like hdbc or takusen.
> Hmm.. That's too bad. AFAIK hdbc and takusen do not have native MySQL
> backends. Last time I tried working with MySQL through ODBC on Linux
> it was quite slow to connect, compared to the native backend. Taking
> over myself is out of question, it is beyond me. So by elimination
> I'll have to find someone!
It is true that HDBC does not have a native MySQL backend. However,
you should not notice a significant performance change with ODBC.
There are a lot of variables that can come into play with ODBC,
though, such as your local configuration, whether you set it up to use
TCP, which ODBC package you are using, etc.
What's more, HDBC has a stronger and more versatile API than HSQL,
which permits even more speed improvements. Features such as
precompiled queries can be huge for many apps, as can referencing
result columns as an ordered list instead of an association list or
Personally, I spent the time to write the Sqlite3, ODBC, and
PostgreSQL bindings for HDBC owing to existing needs. I have no need
for a MySQL binding because I avoid MySQL wherever possible, and where
not possible, use ODBC.
That said, the API is designed to make development of database
backends easy. FFI also is quite nice. It should not be a
significant task for an interested party to write a MySQL backend. I
think it has not happened yet because the ODBC backend is fully
functional for MySQL.
More information about the Haskell-Cafe