note
etcshadow
OK... more context, then (just for fun, though... doesn't really have anything to do with the question):
<p>
We've got a system that has a large number of identically structured databases. Because they are identically structured, then you can imagine a sort of "virtual database" consisting of the sum of all the constituent databases. For example, if you had a table FOO in each of the databases like:
<code>
(
FOOID number,
FOOTYPE varchar,
AMOUNT number
</code>
for example. Thus, in the virtual database, there would exist a <i>virtual</i> table FOO like:
<code>
(
FOOID number,
FOOTYPE varchar,
AMOUNT number,
</code><font color=red><code> DATABASEID number</code></font><code>
)
</code>
<p>
So, if you took a query like:
<code>
select sum(amount), footype
from foo
group by footype
</code>
and ran it against the virtual database, what would actually happen is that the query
<code>
select sum(amount), footype
from foo
group by footype
</code>
would get run in parallel through all of the identical (actual) DBs, and they would each return their result sets to the virtual DB, which would then roll up the individual result-sets into one result set. It's conceptually as though the query were executed like:
<code>
select sum(sum_amount), footype
from (
select sum(amount) as sum_amount, footype
from db1.foo
group by footype
UNION ALL
select sum(amount) as sum_amount, footype
from db2.foo
group by footype
UNION ALL
...
UNION ALL
select sum(amount) as sum_amount, footype
from dbN.foo
group by footype
)
group by footype
</code>
Only with the "UNION"s being executed in parallel.
<p>
To get an even better idea, there's stuff like:
<code>
select sum(amount), footype
from foo
where databaseid in (1,2,3)
group by footype
</code>
This would get pulled apart, such that the "where databaseid in (...)" was removed from the query, and was used, instead, to control the set of databases over which to run the query.
<p>
Anyway, none of that is what I want help with. It's already a done deal... I'm trying to figure out if there are any tools, etc, on how to build an ODBC server interface... I've already got the server to back it up, I just need the ability to slap an ODBC access method onto it.
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-296575">
<code>
------------
:Wq
Not an editor command: Wq
</code>
</div></div>
407443
407463