Re: OT: COUNT query speed issue

2005-06-16 Thread Zoran Avtarovski
Thanks for the suggestion Larry, That's exactly what I was thinking, but I guess I was concerned that it was overkill. Do you know if there are some example approaches or methodologies I can read up on. Z. > Is this historical data? What I mean by that is, does it change frequently? > > If not,

Re: OT: COUNT query speed issue

2005-06-16 Thread Larry Meadors
Is this historical data? What I mean by that is, does it change frequently? If not, maybe a better approach would be to periodically create a table with the data in a summarized form. >From the original email, it sounds like this approach may work for data where the log_time is before today, but

Re: OT: COUNT query speed issue

2005-06-16 Thread Zoran Avtarovski
OK. So indexing multiple columns is pretty easy and made a huge difference to speed. As for single transaction, the answer is no. I thought that waiting on 30 separate transactions would leave the connection open far too long. Z. > Also, do you do this in the scope of a single transaction? > >

Re: OT: COUNT query speed issue

2005-06-16 Thread Zoran Avtarovski
> Do things get faster if you have the database index remote_id and > log_time? > The log_time column is indexed, but I couldn't work out how to index two columns in mysql. Z.

Re: OT: COUNT query speed issue

2005-06-16 Thread Larry Meadors
Also, do you do this in the scope of a single transaction? On 6/16/05, Ron Grabowski <[EMAIL PROTECTED]> wrote: > Do things get faster if you have the database index remote_id and > log_time? > > --- Zoran Avtarovski <[EMAIL PROTECTED]> wrote: > > > I have a quick query regarding the speed of co

Re: OT: COUNT query speed issue

2005-06-16 Thread Ron Grabowski
Do things get faster if you have the database index remote_id and log_time? --- Zoran Avtarovski <[EMAIL PROTECTED]> wrote: > I have a quick query regarding the speed of count query I use to > generate a > chart, which is too slow at present and I'm looking for suggestions > to speed > it up. >

OT: COUNT query speed issue

2005-06-16 Thread Zoran Avtarovski
I have a quick query regarding the speed of count query I use to generate a chart, which is too slow at present and I'm looking for suggestions to speed it up. I pass a collection of the last 30 days data usage to a simple Flash charting app and I use the ibatis query below in a loop thirty times

Re: Am I doing anything wrong? iBATIS has very poor performance on batch inserts compared to JDBC.

2005-06-16 Thread Bing Zou
I already tried it this morning and it worked if I added explicitly sqlmap.startTransaction() before starting the batch. But could you please explain to me why the getTransaction(session) doesn't return the external transaction? Does that mean that such an iBATIS transaction will get a new connecti

Re: Am I doing anything wrong? iBATIS has very poor performance on batch inserts compared to JDBC.

2005-06-16 Thread Bing Zou
Sorry for this lengthy thread. I didn't mean to offend, iBATIS is a great framework and there are a lot of companies including mine that are using iBATIS in production. I know It's very unlikely that this is an iBATIS bug. Most likely I didn't configure it or use it correctly. And that's why the ti

Re: Am I doing anything wrong? iBATIS has very poor performance on batch inserts compared to JDBC.

2005-06-16 Thread Clinton Begin
    Sorry Bing, for my frustrated response.  It's just that posting such performance stats tend to cause concern for other users (like it did for Ming Xue earlier).  We have to be very careful about posting performance stats and make sure to disclaim them.  There are so many factors that not two

Re: Am I doing anything wrong? iBATIS has very poor performance on batch inserts compared to JDBC.

2005-06-16 Thread Bing Zou
sqlMap.startBatch(); Map args = CollectionUtil.createMap(2); for(int i=0;i wrote: > Here we go again with the "OH MY GOD, IBATIS is 100x SLOWER THAN JDBC!!!" > > If that were the case, NOBODY would use iBATIS, let alone the tens of > thousands of people that do. >

Re: Am I doing anything wrong? iBATIS has very poor performance on batch inserts compared to JDBC.

2005-06-16 Thread Clinton Begin
Here we go again with the "OH MY GOD, IBATIS is 100x SLOWER THAN JDBC!!!" If that were the case, NOBODY would use iBATIS, let alone the tens of thousands of people that do. 90% of major performance problems with JDBC, iBATIS, Hibernate etc. are due not to the framework, but moreso with how the da

Re: Am I doing anything wrong? iBATIS has very poor performance on batch inserts compared to JDBC.

2005-06-16 Thread Bing Zou
FYI: I debugged the code and found out that the SQLMapSessionImpl object returned by SqlMapClientImpl.getLocalSqlMapSession() has transaction=null and transactionState=null. The full tree of SQLMapSessionImpl object is: sqlMapSession= SqlMapSessionImpl (id=9681) closed= false dele

Re: Am I doing anything wrong? iBATIS has very poor performance on batch inserts compared to JDBC.

2005-06-16 Thread Bing Zou
Just checked the iBATIS source code. The SqlMapExecutorDelegate.insert () method does have to be in a transaction: public Object insert(SessionScope session, String id, Object param) throws SQLException { Object generatedKey = null; MappedStatement ms = getMappedStatement(id); Trans

Re: Problem with db2 driver

2005-06-16 Thread Larry Meadors
Add type info to the parameters using either the inline syntax (#name:jdbcType#) or an explicit paramter map. That will most likely fix it. Larry On 6/15/05, Esa Kylli <[EMAIL PROTECTED]> wrote: > The two calls I make are exactly the same method (query). It's just that the > first time the met

Re: ORA-00933: SQL command not properly ended

2005-06-16 Thread Kris Jenkins
Hi Andy, 'InlineParameterMap' is the name for the map that's auto-generated when you just supply a parameterClass. I think your problem is in the dynamic WHERE. Imagine this scenario: SELECT * FROM table_x something... something... Because 'a' and 'b'

RE: problem in linux

2005-06-16 Thread James, Steven
you say you checked that the files are in place.. But have you checked the names.. Are they lower case or as outlined in your sqlmapconfig.. As the previous guy has said linux is case sensitive.. Try and ls the file from classes using the exact same text from you sqlmap i.e cd classes ls com/vico

RE: Possibilities and/or impossibilities of subclassing

2005-06-16 Thread Niels Beekman
Hi,   Actually I only need a solution for select; the other types are handled in the DAO. Let’s assume the following classes exist.   Class A {   id   propertyA_1   propertyA_2   type }   Class B extends A {   propertyB_1   propertyB_2   propertyB_3 }   The following result

Re:ibatis on linux (problem solved)

2005-06-16 Thread Gunna Satria
Hi,   after i take a  really2 close look.i found that my PsrecPipe.xml turns out to be PsRecPipe.xml. So, after i change it to the correct one and the apps running well. Thanks Guys.   kind regards,   Gunna Satria H.K., S.Kom.Java ProgrammerPT Infoglobal Aut OptimaMobile: +6285648067148YM: g

RE: Problem with db2 driver

2005-06-16 Thread Esa Kylli
The two calls I make are exactly the same method (query). It's just that the first time the method gets called it works just fine, but when the method gets called again I get the error. The funny thing is that if I switch JDBC driver (in the datasource) to another (AS/400 Toolbox driver) it wor