[PHP] PostgreSQL Cursor ROWCOUNT

2003-01-14 Thread typea
Given: PHP 4.x PostgreSQL 7.3.x In 'psql' monitor: declare foo cursor for select * from humongous_table; move forward all in foo; The second query will print out a number which informs one of the actual number of rows that are in the cursor's query's result set, if one were to actually fetch them

[PHP] Set element closeness measure

2003-01-16 Thread typea
Give about 1 MILLION sets of 1 to ~20 integers such as: (15, 42, 57, 314, 1024) I need to be able to compare any two sets and determine if any of their elements are within, say, 20 of each other. Example: (10, 100, 1000) CLOSETO (50, 150, 1050) ==> FALSE (10, 100, 1000) CLOSETO (15, 150, 1050)

[PHP] DB replicated on RAM disk?

2003-01-17 Thread typea
This got long, but I structured it so one can stop reading when one gets bored or mired in minutia, and constructively answer based on what was read so far. So feel free to stop reading after only a couple paragraphs and fire off a response :-) "+++" marks good stopping-points for this cumulative