[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scsh in PLT Scheme?

 > I am not trying to say that the only way to fetch data is a
 > careful query followed by downloading all results. Only that
 > this is the default (or primary) method and should be so
 > addressed in a scheme to access databases from Scheme.

As I said in my first message, I agree that preloading is fine as a 
default behavior.  But you were also making some fairly 
absolute-sounding statements that I don't believe can be applied as 
absolutely as you've implied, and I wanted to point out that real life 
can be more complicated, just in case anyone else believed you...  ;^P

As it happens, the manual you quoted implicitly covers the example case 
I was using:

> "If all the results from a given query are going to be used in 
> your application, a server cursor is always going to be more 
> expensive than a default result set..."

I was talking about the implied "else" clause in that "if".

Also, database manuals don't usually talk about more modern access 
patterns, like middle-tier application object layers, which can 
introduce all sorts of appaernt inefficiencies at the database level, 
which would horrify a traditional database developer.

>  (There are ways to "protect users from themselves" that
>  we use and they appreciate - like limiting the number of
>  rows returned and suggesting that they refine their request
>  to reduce the amount of data. You can even tell them how
>  much data they requested, ...)

Yes, we do all the same things.  I've also had the experience where a 
search that was limited to return 500 rows was explicitly requested to 
be increased to support thousands.  The requirement might have been 
addressed by providing a more sophisticated search mechanism (which in 
this case would probably have required some kind of simple query 
language, rather than query by form), but simply removing the row 
restriction "solved" the problem to the user's satisfaction.