Re: Cursor the only way to go??
Posted in 1998
klow@avnisoft-dal.com wrote: > > I have an application that wants to browse a table given some > filters. What is the most efficient way to do this? > It is expected that the table will be large and the filter may be made > of several columns from the table. > What I would like to avoid is for the process to block while sucking > up all the data and giving it to me in one big blob. I was thinking > fetches sufficient to fill a page of a scrollBox and everytime the user > scrolls, i fetch another bunch of rows. > Will the initial scan with Cursor take just as long as a normal SELECT? First you didn't specify which front end tool you are using. So lets assume a generic window with scrollbar. The scrollbar will resize as you load more data. So in your design, as the person pulls down the scrollbar, it will shrink. Not a very appealing image to work with. Also, lets look at the logistics. You have lets say 10 rows visible. How will you know to grab more rows or specifically, how will the scroll window know to request more rows. As far as the filtering it has nothing to do with a cursor. you can do this with a prepare statement then you can execute. But, this whole point is moot. How do you plan on retrieving multiple rows without a cursor in the first place? The use of a cursor is independent of your visual GUI design. No matter what you decide to do, you need a cursor. -HTH Mikey -- #include <std_disclaimer.h> /* Mike Segel (MS385) */ #include <No_Spam.h> #ifdef OFFENDED_BY_CONTENT The author takes no responsibility for this post. Any resembalence to a coherent rational thought is purely coincidence. -The Management. #endif ***************************** * Attention * -*- Due to AGIS's Refusal to Act Responsibly -*- Due to ACSI's Refusal to Act Responsibly We are blocking all of their domains at the packet level. This block will exist until they modify their policies to conform to existing RFCs and net community standards. We encourage all ISPs and domain holders to do the same. *****************************