pbarbosa
20th November 2002, 19:10
Hi...

My session "ttaad4222m000 - Count number of records" it start to work very, very slowly....

I dont understand why?

Everyone know why?...

I use BaanIVc4 sch1 and tbase

Regards
Paiva

victor_cleto
20th November 2002, 23:39
If I'm not mistaken, since Baan cannot issue a count(*) to the database so it counts the rows by going thru all the rows of a table. If you're doing this count of a table that grows fast, then it will start becoming slow (also with a lot of users accessing the table).

For people using a "real DB", go thru the database, way (but really way) faster, check with your DBA ( select count(*) from baan.t<table>; )

I'm not used with tbase, but since this is a filesystem DB, with data stored in a file, doesnt work a wc -l <datafile_of_table> to get the nr. of rows?

NPRao
21st November 2002, 00:01
You might build your own tool which can take inputs from a list using - db.nr.rows() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_db_operations_db_nr_rows)

(or)

You can write a small Oracle SQL with joins to company number and tables info of the baan tools and do the count. I found that the Oracle SQL is quite faster than from the BaaN Tools.

tools123
21st November 2002, 00:30
Have you tried using the option within general table maintenance?