> Agreed, but what you are talking about here is decomposing a query into
> it's parallel components and executing them in parallel. This is a win
> of course, but the optimizer and executor have to support it. Also, you
> start to want things like table fragmentation across devices to make this
> work. A big job. As a shortcut, you can just do some lookahead on index scans
> and do prefetch. Doesn't buy as much, but could probably be done very
> quickly.
Yes, this is what I was thinking. Could be done pretty easily, and
hence the TODO addition.
> If you have multiple threads each allocing memory at the same time, the
> allocator data structures have to be protected.
>
> > any heap data that is used locally. But it is a big problem when you
> > take a look at global variables and global data that is accessed and
> > modified in many places. This is potential source of troubles.
>
> Too right.
--
Bruce Momjian | 830 Blythe Avenue
maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)