in-memory-database

How to load a disk-based database to in-memory database using Sqlite in Mono?

有些话、适合烂在心里 提交于 2020-01-25 21:39:06
问题 Can I load a disk-database file (.db) to a in-memory database created by :memory: in Sqlite? I am using Mono, and Mono.Data.Sqlite is the library I am linking to. Does anyone know how to do that? or can anyone point me to a document for this library? Thanks! -gb 回答1: you should use the SQLite Backup API. here is a couple of links. Using the SQLite Online Backup API Online Backup API 来源: https://stackoverflow.com/questions/5130952/how-to-load-a-disk-based-database-to-in-memory-database-using

How to control SQLite in memory DB consumption using C# vb.net

你。 提交于 2020-01-23 18:58:06
问题 I have 100 GB data. I want to load it in-memory using SQLite in VB.Net. I have 32 GB RAM. I want SQLite to take 24 GB RAM and other 8 GB will remain free for other OS tasks. When it hits the 24 GB RAM limit It should start flushing data to some disk file automatically. First: I used in-memory DB. Dim cn As SQLiteConnection = New SQLiteConnection("Data Source=:memory:") But it consumes 31.8 GB RAM, and then OS (Windows 7) jump in and takes the control and start using virtual memory (which

In django, how do I call the subcommand 'syncdb' from the initialization script?

流过昼夜 提交于 2020-01-09 08:39:12
问题 I'm new to python and django, and when following the Django Book I learned about the command 'python manage.py syncdb' which generated database tables for me. In development environment I use sqlite in memory database, so it is automatically erased everytime I restart the server. So how do I script this 'syncdb' command?(Should that be done inside the 'settings.py' file?) CLARIFICATION The OP is using an in-memory database, which needs to be initialized at the start of any process working

Calling Redis zunionstore from Lua with variable KEYS

℡╲_俬逩灬. 提交于 2020-01-06 02:34:11
问题 I have a lua script that needs to call a zunionstore on a variable number of keys. I'm trying to execute the following code: local args = redis.call("zrange", "weight", 0, -1, "WITHSCORES") local r,w local count = 0 local cmd = ' ' for i=1,#args,2 do cmd = cmd .. args[i] .. ":weight " -- building up a list of zsets count = count + 1 end redis.call("zunionstore", "p2_test_set", count, cmd) The important lines being: cmd = cmd .. args[i] .. ":weight " Which builds the list of keys, and the

When should I consider using a in memory database and what are the issue to look out for?

有些话、适合烂在心里 提交于 2019-12-31 17:54:15
问题 I was just think that now it is common to have enough RAM on your database server to cache your complete database why are the specialist in memory database (e.g TimesTen, see also Wikipedia page) that were all the rage a few years ago not being used more? It seems to be that as time go on, none disk based databases are being used less, e.g most applications are now built on conventional rational databases. I would have expected the opposite as RAM is getting close to being free for a lot of

When should I consider using a in memory database and what are the issue to look out for?

旧时模样 提交于 2019-12-31 17:53:19
问题 I was just think that now it is common to have enough RAM on your database server to cache your complete database why are the specialist in memory database (e.g TimesTen, see also Wikipedia page) that were all the rage a few years ago not being used more? It seems to be that as time go on, none disk based databases are being used less, e.g most applications are now built on conventional rational databases. I would have expected the opposite as RAM is getting close to being free for a lot of

64-bit SQLite.dll and Any CPU

旧巷老猫 提交于 2019-12-29 00:43:24
问题 I finally decided to post a question here after some time spent trying to figure out this problem. A few days ago I posted this same question on sqlite forum but that website is currently not available . http://sqlite.phxsoftware.com/forums/t/2669.aspx So, here is the question: I have 64-bit computer with 64-bit OS. A co-worker has 64-bit computer with 32-bit OS. We develop a web application that brings a lot of data from server and keeps it in memory SQLite database, so everything can run

in memory database h2 how long keep connection open?

霸气de小男生 提交于 2019-12-23 13:13:48
问题 I am testing currently a H2 DB in memory mode. I set up a connection by h2Con = DriverManager.getConnection( "jdbc:h2:mem:db1", "SA", ""); I want to some imports with dbunit and set up dbUnits db connection IDataBaseConnection dBUnitConnection = new DatabaseConnection(h2con); and the imports which i want to query later So my question is, in memory mode, when can i close the connection? Normaly i do something like this try{ //some sql query }catch{ //error handling }finally{ if(connection!

unit testing with in-memory database [duplicate]

让人想犯罪 __ 提交于 2019-12-23 09:33:58
问题 This question already has answers here : Running PostgreSQL in memory only (7 answers) Closed 5 years ago . I have PostgreSQL database. It is used for unit testing. I want to speed the tests up so I want to use some kind of in-memory databases (e.g. H2). I want to dump the database (from PostgreSQL) and the import such a dump into in-memory database. Do you have any suggestion concerning in-memory database choice? I want that database to be compatible with PostgreSQL. 回答1: I'd simply create a

Simple and reliable in memory database for fast java integration tests with support for JPA

↘锁芯ラ 提交于 2019-12-18 04:33:44
问题 My integration tests would run much faster if I used in-memory-database instead of PostgreSQL. I use JPA (Hibernate) and I need an in-memory-database that would be easy to switch to using JPA, easy to setup, and reliable. It needs to support JPA and Hibernate (or vice verse if you will) rather extensively since I have no desire to adopt my data access code for tests. What database is the best choice given requirements above? 回答1: For integration testing , I now use H2 (from the original