03.05.2014 21:32, Leyne, Sean wrote:
>
> So, here are my questions:
>
>  1. A query’s operations (the reading of the data and sorting) execute
>     in a single thread/process, correct?

Correct.

>  2. Is Internal sorting performed by the ExecuteWriteTempSortBlock() step?

Internal buffer is sorted as soon as filled up to its limit and then 
written into the temp space. More or less what you describe, AFAIU. 
Although in fact, runs (sorted buffers) may still reside in memory in 
other (larger) buffers. And the temp space manager does its own caching 
as well.

>  3. Does sorting use pointers to row sort data or are the rows moved in
>     memory during sort?

Rows are moved. This is done this way to avoid duplicated record fetches 
(when sort results are retrieved) causing random I/O. Sorting itself may 
be also highly I/O bound, but it always operates quite large blocks.


Dmitry


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to