BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

working over internet

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
Dettmer, A.L.
Guest





PostPosted: Fri Sep 03, 2004 1:11 pm    Post subject: working over internet Reply with quote



Hi Folks:

It's time to for help again.

I'm working from home doing some investigation remote DBX access using
the "classic" team:

connection -> SQLDataSet -> Provider -> ClientDataSet

I set clientDataSet property commandText to ctTable and PackedRecords
to 50. After this I connected the ClientDataSet to a DBGrid and stated
browsing the data, well I tried it.

I was connected to big tables 50K plus records and to my deception I
think that the clientDataset ignored the PackedRecords setting and
fetched the entire table, can you imagine the time it take over an ADSL
commercial (crowded) connection ? Or I misunderstood borland help about
this property or there are something missing.

The last but not the ... : I'm using D7/PGSQL 7.4 running under a Free
BSD server/vitavoom PGDriver, last version configure to use it's
BLOCKREAD with a ROWSETSIZE of 100.

Thanks for your answers.
Back to top
Wayne Niddery [TeamB]
Guest





PostPosted: Fri Sep 03, 2004 3:23 pm    Post subject: Re: working over internet Reply with quote



Dettmer, A.L. wrote:
Quote:

I set clientDataSet property commandText to ctTable and PackedRecords
to 50. After this I connected the ClientDataSet to a DBGrid and stated
browsing the data, well I tried it.

I was connected to big tables 50K plus records and to my deception I
think that the clientDataset ignored the PackedRecords setting and
fetched the entire table, can you imagine the time it take over an
ADSL commercial (crowded) connection ? Or I misunderstood borland
help about this property or there are something missing.

Use SQL explicitly and provide a Where clause that fetches only a small
number of those 50K records, there is simply no good reason you need to have
the user browse 50K records or any significant part of it, this is true even
if you have good bandwidth. ClientDataset itself isn't really designed to
handle more than, say, a couple of thousand records before bogging down, and
even that many is too many for a slow connection.

--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
RADBooks: http://www.logicfundamentals.com/RADBooks.html
Working for yourself is great because you get to work half days, and
you can choose any twelve hours you want.



Back to top
Dettmer, A.L.
Guest





PostPosted: Fri Sep 03, 2004 3:40 pm    Post subject: Re: working over internet Reply with quote



Wayne Niddery [TeamB] wrote:


Quote:
Use SQL explicitly and provide a Where clause that fetches only a
small number of those 50K records, there is simply no good reason you
need to have the user browse 50K records or any significant part of
it, this is true even if you have good bandwidth. ClientDataset
itself isn't really designed to handle more than, say, a couple of
thousand records before bogging down, and even that many is too many
for a slow connection.

Hi Wayne, thanks for your response, but...

You are quite right about browsing 50K records at the same time but our
users what to navigate its data using a DBGrid (remenber HE is the
customer) so would like to know if you culd point an example showing
how to fetch, say chunks of 250 records from my table and at the same
time
have "smoth" navigation inside a DBGrid,or it's impossible ? Note that
I use FetchOnDemand as TRUE. I'm afraid that you will tell me that this
is impossible due to ClientDataSet internal buffer or something like.

Anyway, I'm here to learn from you.



Back to top
Wayne Niddery [TeamB]
Guest





PostPosted: Fri Sep 03, 2004 10:49 pm    Post subject: Re: working over internet Reply with quote

Dettmer, A.L. wrote:
Quote:

You are quite right about browsing 50K records at the same time but
our users what to navigate its data using a DBGrid (remenber HE is the
customer)

No doubt he also wants realy fast performance, no bugs, done yesterday, and
done cheap. Every customer wants all of those things but they can only get a
subset. Giving him what he wants by definition excludes the first item in
this case.

I wrote an article just for you <g>
http://www.logicfundamentals.com/pages/BrowsingLargeTables.aspx

The basic point is that part of your job is to advise the customer and help
him realize better ways of doing things. In my rather extensive first hand
experience on this very issue, once they work with a better designed
front-end, resistance melts away and they end up liking it and thanking you
because they have a *responsive and productive system that's also easy to
use*.

The customer is almost always right about the the work they need to get
done - that's their business; but rarely right on the best way to achieve
that on their computer - that's *our* business.

Quote:
so would like to know if you culd point an example showing
how to fetch, say chunks of 250 records from my table and at the same
time
have "smoth" navigation inside a DBGrid,or it's impossible ?

Using PacketRecords should work. If it's fetching all up front then there
must be some code that's causing that - perhaps you are looking at
RecordCount or something else that requires all to be fetched.

However, even with this working correctly, all the customer has to do to
kill the system is drag the scrollbar to the bottom and he'll be cursing
you. If you offer him a way to search or re-order the rows in the grid,
he'll curse you again if the needed records haven't already been fetched.
With that many records he'll curse you anyway because he'll find navigating,
searching, and sorting in a ClientDataSet, after it has loaded 50K records
into memory, won't be too snappy either.

All you need to do is provide an easy to use screen to allow search criteria
to be entered. The wonderful thing about SQL is you can query on any number
of fields. Instead of having to page down some 35,000 records (at 20 rows
per page, that's about 1,750 keystrokes) to get to "Smith", he enters 5
characters in an edit control and presses a search button. Now he has,
maybe, a couple of hundred Smith's to choose from in your grid and he'll be
able to *instantly* scroll and reorder the rows on any field in that grid.
Until he enters at least some search criteria, the grid should remain
*empty*.

The ironic part is, as is typical with most apps that display all records
like this, you'll provide him a box so he can enter 'Smith' *anyway*, just
so you can filter or locate to those records. The only difference is you are
getting him to do this *first* before showing him the records. If he needs
to see Smith then he doesn't need to see Abercombe or Zeigfreid at the same
time.

--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
RADBooks: http://www.logicfundamentals.com/RADBooks.html
"Democracy, without the guarantee of liberty, is merely a method of
selecting tyrants." - Alan Nitikman



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.