Sunday, March 8, 2020

MySql is good choice for EF Core

In my case, I want to continue store data in CSV. Storage engine in MySql will help me do that and simply integrate my apps directly to data. It also helps to storage al data directly in memory for a cache. Of course, only InnoDB supports transactions, but I only consumer.

SHOW ENGINES

this command shows what  I have 9 store engines out of the box.

MEMORY    Hash based, stored in memory, useful for temporary tables    InnoDB    (DEFAULT)    Supports transactions, row-level locking, and foreign keys
PERFORMANCE_SCHEMA    Performance Schema
MyISAM    MyISAM storage engine
MRG_MYISAM    Collection of identical MyISAM tables
BLACKHOLE    YES    /dev/null storage engine (anything you write to it disappears)
CSV    CSV storage engine
ARCHIVE    Archive storage engine

It has workaround for enable storage engine in DataContext in EF code first solution using migration.

Solution:
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql("SET default_storage_engine=INNODB");
//Another migration code is generated here
}

But then, you can generate  data with EF fluent interface code and only one command will be mode all this data to in memory database to fast performance calculations.

ALTER TABLE mytable ENGINE=MEMORY

Thank you, Oracle for this convenience.



It is look like a point in strategy where I can to upload normalized graph data from Arango DB to csv and then to the memory to load all data in GPU.

No comments:

debug magazine archive

  71 jounals still available on issuu with great story of netlabels time.  debug_mag Publisher Publications - Issuu