Hi, using MySQL is a starting point for the customer (could be a different db later and it´s possible that data will be collected in different versions of MySQL in the beginning). So the views in MySQL will give troubles. It´s the main reason for me to have a look for torque in the moment. Otherwise I would have done it directly with SQLs. My point is, that I do not understand the point about the Joins - for my feeling it´s all done in the BaseXXXPeer-classes and it looks amazing good - but I can't get it to work in the way I understand it (so we have two points: I can't ... and I understand... what could be wrong :-))
Anyway, thanks for the log4j-tip - I will do some tests, maybe I understand better then :-) Stephan -----Ursprüngliche Nachricht----- Von: Greg Monroe [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 20. Januar 2006 16:24 An: Apache Torque Users List Betreff: RE: Joins in torque (slightly Off Topic) Haven't used it but have heard DB Solo can do execution plans for many DB's. http://www.dbsolo.com/ Squirrel-SQL (Open source) might have a plug-in to do this, but I'm not sure. http://squirrelsql.org/ Check the MySQL manuals for query optimization chapters. Oh, BTW, if you set up your log4j options so that Torque is using the debug level, the debug log will have queries and execution times. Nice way to scan for slow queries that need optimizing and to verify that your criteria is doing the right thing. > -----Original Message----- > From: Alvaro Coronel [mailto:[EMAIL PROTECTED] > Sent: Friday, January 20, 2006 7:16 AM > To: Apache Torque Users List > Subject: RE: Joins in torque (slightly Off Topic) > > > Can you recommend a tool like MS Query Analyzer for MySQL > > Thx! > > Álvaro > > Greg Monroe <[EMAIL PROTECTED]> wrote: An alternate > thought is to just create a view in the database (MySQL V5 > supports them) and then do a > psuedo table in the XML to generate the required > classes. > > You probably already know this, but when you're > doing complex joins like this, pay close attention > to what needs to be indexed. Without the right > indices, a large join query against a large number > of records can grind your app to a halt. I tend to > spend some time in a Query Analyzer type tool > (e.g. MS SQL's Query Analyzer...lol) to optimize > any complex queries that underlie views. > > > -----Original Message----- > > From: Stephan Spiegel [mailto:[EMAIL PROTECTED] > > Sent: Thursday, January 19, 2006 11:17 AM > > To: [email protected] > > Subject: Joins in torque > > > > > > Hi, (in case this message is double please excuse me) > > > > I really do not understand what to do, I do not get the > > expected results! > > > > Let´s say I have 3 Tables: T1, T2 and T1_2 > > T1: > > ID (integer pk) > > value (varchar) > > ... > > > > T2: > > ID (integer pk) > > value (varchar) > > ... > > > > T1_2: > > T1_ID (integer fk->T1) > > T2_ID (integer fk->T2) > > > > As a result, I would like to have a union table showing the > > values of T1 and T2 in SQL this would be: select T1.value, > > T2.value from T1, T2, T1_2 where T1.ID = T1_2.T1_ID and T2.ID > > = T1_2.T2_ID > > > > if I get more than this (select * ...) would be fine as well. > > > > So, I have my classes but when I try to use them as written > > in Peers HowTo > > (doSelectJoin...) or in Criteria HowTo (crit.addJoin(...)) I > > always get only the values of the T1_2-table > > > > As a first step, I try just to get the first half (result > > should show: T1.value, T1_2.T2_ID) so it should correspond to: > > doSelectJoinT1(crit) in T1_2Peer > > or: > > crit.addJoin(T1.ID,T1_2.T1_ID,Criteria.LEFT_JOIN) > > > > as a result I just get the T1_2 values. I checked the > > mailing-list-archives, I can´t find a helpful message. Where > > is my mistake? Could somebody tell me exactly how to add this join? > > > > (I´m using torque-3.2, MySQL 5, defaultidMethod=native) > > > > thanks in advance, Stephan > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > Duke CE Privacy Statement > Please be advised that this e-mail and any files transmitted > with it are confidential communication or may otherwise be > privileged or confidential and are intended solely for the > individual or entity to whom they are addressed. If you are > not the intended recipient you may not rely on the contents > of this email or any attachments, and we ask that you please > not read, copy or retransmit this communication, but reply > to the sender and destroy the email, its contents, and all > copies thereof immediately. Any unauthorized dissemination, > distribution or copying of this communication is strictly prohibited. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------- > Yahoo! Autos. Looking for a sweet ride? Get pricing, > reviews, & more on new and used cars. > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
