Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Sci-fi or dbisam-possible?
Mon, Jan 13 2014 4:33 AMPermanent Link

Alessandra Romano

Let's consider a single table.. i'd like to launch two parallel SELECT
queries.. the first, considering the first half of the records and
putting the result INTO "\memory\a" ; the second considering the second
half of the records a putting the result INTO "\memory\b".
When both threads are done, i'd like to create a UNION of "a" and "b"
and put the union into a "\memory\results" table.

With parallel queries the speedup should be NOTICEABLE!

Is that possible with DBISAM 4 ?

Thanks.
A.
Mon, Jan 13 2014 9:18 AMPermanent Link

Raul

Team Elevate Team Elevate

Sure. DBISAM is thread-safe so this is fairly straightforward for the
select part. If you want to use actual union command then that to be
handled by a single thread (or you can just do regular insert from both
threads into a common table if you desire parallel processing there as
well).

If all you're doing is select and union at the end then not sure how
much speed improvement you'll see. depending on size of tables quite a
bit of time (relatively) might be spent just read it from disk.
If your threads actually process the data somehow and that is where the
time is spent then yes this should be faster.

However i'd also compare this to single threaded operation opening both
source and destination in exclusive mode and see how that compares.

Raul


On 1/13/2014 4:33 AM, Alessandra R. wrote:
> Let's consider a single table.. i'd like to launch two parallel SELECT
> queries.. the first, considering the first half of the records and
> putting the result INTO "\memory\a" ; the second considering the second
> half of the records a putting the result INTO "\memory\b".
> When both threads are done, i'd like to create a UNION of "a" and "b"
> and put the union into a "\memory\results" table.
>
> With parallel queries the speedup should be NOTICEABLE!
>
> Is that possible with DBISAM 4 ?
>
> Thanks.
> A.
>
Image