Hi Joshua,

you're correct, DBMail does not use Cursors. This is because MySQL
does not support cursors. The code bases for the MySQL and PostgreSQL
are mostly the same.

Ahh o.k. Although I appreciate the need to keep things simple,
the PostgreSQL should probably be gone through. MySQL and
PostgreSQL are very different beasts.

However, if we can benefit from using cursors,
and it if this can be implemented using our current code (for the rest
of DBMail that is, the driver can change of course) it would be
interesting.
Well take the following example:

select * from foo where id = 4;

This results in 90,000 tuples.

On a 512 meg machine, (or even possibly a 1 gig machine)
depending on the size of each tuple will take forever on
PostgreSQL because it has to pull all of the information
into memory before it delivers the results. It will also
drive the load of the system up. It may even crash the
backend because the system will run out of memory.

A cursor on the other hand will access the records in
segments allowing for much better user of ram.

Also as you use persistent connections to the database
for imap, if you were to track each connection you could
prepare statements before hand allowing even faster access.

Sincerely,

Joshua D. Drake












Ilja
_______________________________________________
Dbmail mailing list
Dbmail@dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - [EMAIL PROTECTED] - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL

begin:vcard
fn:Joshua Drake
n:Drake;Joshua
org:Command Prompt, Inc.
adr:;;PO Box 215 ;Cascade Locks;OR;97014;US
email;internet:[EMAIL PROTECTED]
title:Consultant
tel;work:503-667-4564
tel;fax:503-210-0334
x-mozilla-html:FALSE
url:http://www.commandprompt.com
version:2.1
end:vcard

Reply via email to