
5-22 IBM Informix OnLine Database Server Administrator’s Guide
Psort Parallel-Process Sorting Package
Psort Parallel-Process Sorting Package
Psortisasortingpackagethatimprovesperformancebytakingadvantageof
multiprocessors to start and synchronize multiple sort processes. This
parallel-process sorting package is transparent to end users. (If you are
working on a uniprocessor machine and you set any of the parallel-sort
parameters, OnLine ignores the parameters and proceeds with nonparallel
sorting.)
Psort becomes an option for OnLine under either of three conditions:
■ Thedatabaseserverprocessisorderingqueryresults.(AnORDERBY
clause appears as part of a SELECT statement.)
■ The database serverprocess is eliminating duplicates. (The UNIQUE
or DISTINCT keyword appears in the SELECT statement.)
■ The database server process is executing a sort-merge join, a new
multitablejoinmethodthatisusedwiththeolder “nested-loop” join
method.
How Psort Works
To enable Psort,setthePSORT_NPROCS environmentvariable,whichdefines
the upper limit for the number of processes used to sort a query. To disable
Psort, unset the PSORT_NPROCS environment variable. (Refer to the next
topic for guidelines for setting the value of PSORT_NPROCS.)
IfPsortisenabled, OnLine performs parallelsortingonlywhenperformance
is likely to improve. OnLine does not employ parallel sorting for a small
number of input rows or if a table index supports the order requested in the
query.
If OnLine engages Psort, multiple sorted runs are made in memory, written
to disk,and then merged from disk into asingle result stream. OnLinecalcu-
lates the numberof processes to useinthe sortbasedon thesizeof thequery
and the number of processors on the system. You can tune Psort by limiting
the maximum number of processes available to OnLine and by directing
OnLine to use directories on different disks for the intermediate writes.
Komentarze do niniejszej Instrukcji