Hello,
I am wondering about the implementation of substring for very large
strings. I've got strings that are several million characters long and
frequently need to extract relatively small substrings (5000-40000
characters) (that's right, it's DNA). Before I cared much about
performance, I retrieved the whole string and and substr'ed it in perl.
I realized recently it is better to do the substring in postgres
(performance increase by an order of magnitude). So here is what I am
wondering: does postgres read the whole string into memory before it
does the substring, or does it have some sort of smart way of reading
just the substring from disk?
I am wondering because I can think of ways of potentially improving
performance, but at significant cost to the API, and I don't want to
implement it unless I will get a big boost in performance.
Thanks,
Scott
--
------------------------------------------------------------------------
Scott Cain, Ph. D. cain@cshl.org
GMOD Coordinator (http://www.gmod.org/) 216-392-3087
Cold Spring Harbor Laboratory