Try to compare the two execution plans generated for the "query" and the "while select" they ought to be similar. Otherwise, your relations on the query might be incorrect.

PS: Limiting the loop runs to 100 will still fetch the same amount of data, as the qr.next() positions the cursor / pointer onto the next record that is already fetched from the DB in the select statement generated by the query.

:-J

Systemdeveloper
Jacob Hjelmer

Thy Data Center Development A/S
Søvej 13b
DK-3460 Birkerød
Denmark

Phone : +45 96 170 470
Fax   : +45 45 824 544

URL   : http://development.thydatacenter.dk/ <blocked::http://development.thydatacenter.dk/
E-mail: [EMAIL PROTECTED] <blocked::mailto:[EMAIL PROTECTED]@thydatacenter.dk> 

________________________________

From: Matt Benic [mailto:[EMAIL PROTECTED]
Sent: 12. oktober 2004 11:22
To: Axapta Dev
Subject: [development-axapta] DB session persistence


Hi all,
We have been developing a report, and in the process have seen some
distrubing behaviour. I was wondering if anyone else has experienced this or
can offer some explanation.

Two things happened, the first is that when we kill the axapta client
running the report (using the Admin->Online Users form), the DB session
keeps draining resources from SQL (disk io, memory, cpu). Should this
session not be killed immediately by Axapta? Since it is a report, rollbacks
would not explain this.

The second is that despite putting an integer limit of 100 loop runs in the
while(qr.next()) loop in our fetch method, the report runs for ages, it
seems  to do the full join specified in the query (between custtrans and
ledger trans) before actually running through the loop. If we rather use a
while-select, this does not happen and the report is wuite speedy. Is there
something fundamental that can be changed in the query engine to sort this
out?
Regards,

Matt Benic
Axapta Developer
UTi Sun Couriers Division

"The universal aptitude for ineptitude
makes any human accomplishment an incredible miracle."
- Col. John P. Stapp







Yahoo! Groups Sponsor
ADVERTISEMENT
click here <http://us.ard.yahoo.com/SIG=1295nrd0d/M=295196.4901138.6071305.3001176/D=groups/S=1705006764:HM/EXP=1097659521/A=2128215/R=0/SIG=10se96mf6/*http:/companion.yahoo.com>
<http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=groups/S=:HM/A=2128215/rand=659671521>

________________________________

Yahoo! Groups Links
*      To visit your group on the web, go to:
      http://groups.yahoo.com/group/development-axapta/
       
*      To unsubscribe from this group, send an email to:
      [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
       
*      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .


[Non-text portions of this message have been removed]


Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to