On Fri, 2006-06-16 at 12:37 +0200, Paul J Stevens wrote: > > Jim C. Nasby wrote: > > > Is there some reason why bound parameters aren't being used? Aside from > > the security aspect, they also provide a speed improvement. > > Prepared statements are planned for 2.3+. > > They will however not be usable in some cases. Most queries (90%) will > be convertable. They are of the 'dumb' kind suited for this. But the > really complex ones like in the imap-search/sort code are a different > matter. Those are constructed based on the actual imap command > parameters. And imap-fetch will also be rewritten in that direction.
The simple queries are very important to target: we're probably copying each incoming message 2-3 times before it gets stored. Off the wire, quoting, into the query. Possibly once more while converting crlf's? I'd like to home in on "zero copy" for better performance. Aaron