Re: Performance problem on client/server
Posted in 1996
billy@west.co.za (Billy Wheeler) wrote: :> To get this behaviour out of a 4GL program would be very hard indeed. :> 4GL is so different from VB in the way it interacts with the db you :> shouldn't think too much about that. :Nils, unless I'm missing something here (which I could well be doing! :), Yes, you are. : this :seems to be very much the way VB would work - all the client on machine A, all :the data on machine B, and data transfer across the network becoming a major :hassle. Yes this is correct - if you missuse VB, mostly by programming straightforward, and not realy knowing what you are doing. This was the posters experience from VB. My point was only that this doesn't apply in the same way to 4GL even in a client/server environement like he is. He believed that the execution of sql from his 4GL program runing on the client machine would transfer the whole table (about 64.000 rows) before applying the where clause to the data. This is actually possible throug missuse of sertain statements in VB. It isn't in 4GL. If you have one database only (no joins between tables in different databases on different machines) the complete sql statement will be executed in the database, data will be joined, other parts of the where clause applied, and only the result will be transfered back to the program running on the client - allways. For the original poster this makes the VB environement and Informix 4GL so different that I asked him not to consider his experiences in VB to much when it came to 4GL programming. They are too different to make that very virthwile, at least in this context. The transfer of a whole table is not his problem, unless of course he has no where part at all, or even worse, a join but no selection in his where clause (doing the selection programmatically in 4GL instead). This however I found to inconceivable to even mention. When I think about it again, it could however explain why it takes 40 seconds to generate 52 invoices when the program is run on the server. If he is actually reading all 64000 records into his 4GL program this way, it could take this long. That might even increase to the 50-60 minutes he sees when the program is run on a client with the database on a separate server machine, if the connection between them is slow. If that's the case he will either have to make up a (more) selective where clause, buy a faster network, or run the program on the server (not necessarily in that order). We'll have to wait for him to come back to tell us more to see what his actual problem is. ... snip ... Nils.Myklebust@ccmail.telemax.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company