GithubHelp home page GithubHelp logo

Comments (7)

dflemstr avatar dflemstr commented on June 24, 2024

Why? Shouldn't this be done with the MySQL administration tools? It's not the task of Squeryl to manage database-specific defaults, I think.

But as you said on the mailing list: if a solution is found for setting engines per-table, it'd be the way to go.

from squeryl.

max-l avatar max-l commented on June 24, 2024

I think I see you point, but I thought that having MyISAM as the default adapter sucks, since it misleads those who think they are getting transactional behavior, don't you think ?

from squeryl.

dflemstr avatar dflemstr commented on June 24, 2024

Yes, it sucks, but it would be better in that case to disable the transaction functionality in Squeryl completely (e.g. by raising an exception if the engine doesn't support transactions, so that the dev is inclined to switch engine) when MyISAM is active, instead of ignoring the problem and going with a different engine. That's at least what I think.

Many (most?) MySQL installations use InnoDB per default, so this is only an issue for a few people.

from squeryl.

max-l avatar max-l commented on June 24, 2024

I can imagine some cases where people will use InnoDB for most of there application, (to get transactionality) but use MyISAM for a few tables, where they want maximum read performance. I've read about such uses cases where one has an application database on InnoDB, and a data warehouse on MyISAM.

from squeryl.

max-l avatar max-l commented on June 24, 2024

Perhaps a solution can be to simply have a constructor param in the MySQLAdapter that is the engine name, this has the advantage of forcing the user to make a concious choice, or at least to inform the user that such a choice exists.

from squeryl.

nairbv avatar nairbv commented on June 24, 2024

Actually, it uses MyISAM by default:

mysql> create table foo(id int);
Query OK, 0 rows affected (0.01 sec)

mysql> show create table foo;
+-------+-----------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+-----------------------------------------------------------------------------------------+
| foo | CREATE TABLE foo (
id int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
+-------+-----------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

It's a bit odd, but, that's how they get their fancy benchmarks.

I would certainly prefer if MySQL used InnoDB as a default, but it would be unexpected behaviour for that choice to be made in a client-side library.

I like the idea of throwing an exception if a user tries to start a transaction on a MyISAM table.

from squeryl.

max-l avatar max-l commented on June 24, 2024

closed since :
b701a9e

from squeryl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.