One thing you can do which is similar - but not really the same - is to use an in-memory database. The Mckoi db which comes with the standalone Smith package will do this.
To set it up in standalone Smith, create a new datasource like the default mckoi datasource with these differences:
the JDBC URL is: jdbc:mckoi:local://wwwroot/db.conf?storage_system=v1javaheap&create_or_boot=true
the Connection Checkout Timeout (ms) is: 10000(because the first connection can take several seconds)
Keep idle connections for: 0(i.e. connections last forever)
There is no need to run startdb.bat or startdb.sh to use this in-memory Mckoi database. It exists entirely in the Smith process' memory. No db server process is required. All the data in this database will evaporate when Smith is shut down, so you will need to populate tables like this:
Code:
<cflock name="temp_table" timeout="30" type="EXCLUSIVE">
<cfquery datasource="mckoi_mem" name="q1">
DROP TABLE IF EXISTS temp_table
</cfquery>
<cfquery datasource="mckoi_mem" name="q1">
CREATE TABLE temp_table (id INTEGER, stuff VARCHAR(128), PRIMARY KEY (id))
</cfquery>
<!--- populate the table --->
</cflock>
and perform queries on the table like this:
Code:
<cflock name="temp_table" timeout="30" type="READONLY">
<cfquery datasource="mckoi_mem" name="q1">
SELECT * FROM temp_table WHERE id BETWEEN #a# AND #b#
</cfquery>
</cflock>
This is unlike query-of-queries because all the simultaneous pages share the same database, and share the tables - just like a real database. Hence the need for <cflock>.
Queries on an in-memory database are typically very fast, and it is safe for any number of simultaneous pages to perform read-only queries at the same time.