One word 'profiler'.

-dain

On Wednesday, February 26, 2003, at 04:32 PM, Rafal Kedziorski wrote:

hi,

At 09:24 26.02.2003 -0500, David Jencks wrote:
You can find out how to configure this stuff and why it works the way it
does in the for pay cmp docs or by looking for the numerous less complete
explanations about transactions, read-ahead page size, etc in the mailing
lists and forums. The docs will save you a lot of time.

i've done some tests: - PostgreSQL 7.3.2 - JBoss 3.0.6 - J2SE 1.4.1_01

one table with two cols (id, name) with 1002 entries

1st test:
<read-ahead>
  <strategy>on-find</strategy>
  <page-size>2</page-size>
  <eager-load-group>*</eager-load-group>
</read-ahead>

needed about 4,2 sec. (=100%)


2nd test: <read-ahead> <strategy>on-find</strategy> <page-size>4</page-size> <eager-load-group>*</eager-load-group> </read-ahead>

needed about 6,4 sec. (+52% copared to 1st test)


3rd test: <read-ahead> <strategy>on-find</strategy> <page-size>10</page-size> <eager-load-group>*</eager-load-group> </read-ahead>

needed about 23,4 sec. (+457% copared to 1st test)

for every test, the server was started again.

why the big differences?


Rafal


david jencks

On 2003.02.26 06:57 Rafal Kedziorski wrote:
> Hi,
>
> my every entity beas has findAll() method defined in ejb-jar.xml as
> follow:
>
> <query>
> <query-method>
> <method-name>findAll</method-name>
> <method-params/>
> </query-method>
> <ejb-ql><![CDATA[SELECT OBJECT(o) FROM firm o]]></ejb-ql>
> </query>
>
> Could be this done better by other mechanism? JBoss are generating this
> query for PostgreSQL:
>
> // get all id's
> LOG: query: SELECT t0_o.firm_id FROM firm t0_o
>
> // call for every id
> LOG: query:
> SELECT firm_id,name FROM firm WHERE (firm_id=1) OR (firm_id=2) OR
> (firm_id=1046258766552575) OR (firm_id=1046258766812847) OR
> (firm_id=1046258766781998) OR (firm_id=1046258766823725) OR (
> firm_id=1046258766815290) OR (firm_id=1046258766821931) OR
> (firm_id=1046258766808355) OR (firm_id=1046258766805899) OR
> (firm_id=1046258766840567) OR (firm_id=1046258766818653) OR
> (firm_id=1046258766857549) OR (firm_id=1046258766870043)
>
> ...
>
> LOG: query: SELECT firm_id,name FROM firm WHERE
> (firm_id=1046258766821931) OR (firm_id=1046258766808355) OR
> (firm_id=1046258766805899) OR (firm_id=1046258766840567) OR
> (firm_id=1046258766818653) OR (
> firm_id=1046258766857549) OR (firm_id=1046258766870043)
>
> ...
>
> LOG: query: SELECT firm_id,name FROM firm WHERE
> (firm_id=1046258766818653) OR (firm_id=1046258766857549) OR
> (firm_id=1046258766870043)
>
> ...
>
> LOG: query: SELECT firm_id,name FROM firm WHERE
> (firm_id=1046258766857549) OR (firm_id=1046258766870043)
>
> ...
>
> // last sql query
> LOG: query: SELECT firm_id,name FROM firm WHERE
> (firm_id=1046258766870043)
>
>
> why are sending JBoss not for every firm_id one query?
>
> I have other tables, where are stored much more values. which generate
> than longer query.
>
>
> Best Regards,
> Rafal
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Scholarships for Techies!
> Can't afford IT training? All 2003 ictp students receive scholarships.
> Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
> www.ictp.com/training/sourceforge.asp
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
>



------------------------------------------------------- This SF.net email is sponsored by: Scholarships for Techies! Can't afford IT training? All 2003 ictp students receive scholarships. Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. www.ictp.com/training/sourceforge.asp _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user



------------------------------------------------------- This SF.net email is sponsored by: Scholarships for Techies! Can't afford IT training? All 2003 ictp students receive scholarships. Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. www.ictp.com/training/sourceforge.asp _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user



------------------------------------------------------- This SF.net email is sponsored by: Scholarships for Techies! Can't afford IT training? All 2003 ictp students receive scholarships. Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. www.ictp.com/training/sourceforge.asp _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to