Re: Query result times in WO and mysql
Re: Query result times in WO and mysql
- Subject: Re: Query result times in WO and mysql
- From: Jake MacMullin <email@hidden>
- Date: Wed, 21 Jan 2004 13:38:47 +1100
What are you doing with the results of the query? I don't know much
about the performance penalty of simply executing a query from WO - but
most of the time, executing a query in WO results in the creation of
many objects (1 for each row of the table) - There will always be an
overhead involved in creating Java objects - my guess is that this is
the primary cause for your query taking longer - rather than anything
to do with the database/webobjects communication - although I could be
wrong.
Rather than seeing this as a limitation of WebObjects - it may just
bring design decisions in to focus. Why do you need to retrieve 5500
rows from your database for example? Are you going to display them all?
Why not just fetch the number of rows that your users need at any one
time?
Regards,
Jake MacMullin
On 21/01/2004, at 10:02 AM, Klaus Berkling wrote:
> I am in the middle of a large project porting an old file based system
> to WebObjects/MySQL. I am also somewhat new to WebObjects.
>
> It takes about 2 seconds to run a query against MySQL using
> EOUtilities.rawRowsForSQL().
> It takes about 0.26 seconds for the same query in the mysql command
> line utility.
> There is about 346KB of data in 5500 rows.
>
> Is this normal?
>
> WebObjects 5.2
> MySQL 4.0.15
> MySQL-ConnectorJ-3.0.6.jar
> Dual 1Ghz/1MB RAM
>
> (I'm using rawRowsForSQL because I use LIMITs, not using raw SQL makes
> things much slower.)
>
> Thanks for any insights.
>
> kib
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:http://www.lists.apple.com/mailman/listinfo/
> webobjects-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.