[yunqa.de] Re: Disqlite 3 Pro : Temporary table question

  • From: "Jon Burnham" <jba@xxxxxxxxxxxxxx>
  • To: <yunqa@xxxxxxxxxxxxx>
  • Date: Sun, 1 Apr 2012 22:06:20 +0100

Amended.

1) In this scenario, should I be using multi DBs or just one. Is there a 
performance gain/loss by using many?

2) Should I use disk based or mem based DBs, again in this scenario.

=====>> Please Ignore  - found it (3) Please can you give me a quick pointer on 
how to use params for that query.

4) Is there a good way I can avoid using 'inline' SQL, as I hate it, it's so 
prone to errors (for me). 




-----Original Message-----
From: yunqa-bounce@xxxxxxxxxxxxx [mailto:yunqa-bounce@xxxxxxxxxxxxx] On Behalf 
Of Jon Burnham
Sent: 01 April 2012 20:44
To: yunqa@xxxxxxxxxxxxx
Subject: [yunqa.de] Re: Disqlite 3 Pro : Temporary table question

R.

Thinking again, and just to simplify that last email, which was mainly 
b*ll*cks. What is your guidance on the following? -

1) In this scenario, should I be using multi DBs or just one. Is there a 
performance gain/loss by using many?

2) Should I use disk based or mem based DBs, again in this scenario.

3) Please can you give me a quick pointer on how to use params for that query.

4) Is there a good way I can avoid using 'inline' SQL, as I hate it, it's so 
prone to errors (for me). But then params make this difficult if there is no 
design persistence to accommodate them.

Easier to understand I hope.

J.



-----Original Message-----
From: yunqa-bounce@xxxxxxxxxxxxx [mailto:yunqa-bounce@xxxxxxxxxxxxx] On Behalf 
Of Delphi Inspiration
Sent: 01 April 2012 19:53
To: yunqa@xxxxxxxxxxxxx
Subject: [yunqa.de] Re: Disklite 3 Pro : Temporary table question

On 01.04.2012 17:19, Jon Burnham wrote:

> I was looking at the control, not in code, it warns me that I cannot 
> name a temp file when enabled.

I do not know what you did to "create a temp file at the control" so it is hard 
for me to help avoiding the warning.

Please know that in DISQLite3, a memory database and a temporary table are two 
different things. Memory databases are stored entirely in memory, including all 
tables and indexes. A memory database is temporary in that they are never 
written to disk, it memory is automatically freed when the database is closed. 
No need to create temporary tables for memory databases.

  DISQLite3.chm -> SQLite3 Documentation -> In-Memory Database

Temp tables are not kept in memory but are written to a separate disk file, 
very much like regular tables. The only difference is that this disk file (with 
all its tables) is automatically deleted when the database is closed:

  DISQLite3.chm -> SQL Syntax -> CREATE TABLE
  DISQLite3.chm -> SQLite3 Documentation -> Temporary Dis Files used

My impression is that you are in fact looking for memory databases rather than 
temporary tables.

> It would be good if you could do it from there. I just want to borrow 
> a structure/data from an existing dataset and use it as a local SQL 
> cache.

Did you try the TDISQLite3DataSetImporter class? It does not import at 
design-time, but at run-time does exactly what you are looking for:
Create structure and copy data with just a single command.

Ralf
_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: