Re: A Simple Query Help

2012-04-22 Thread Igor Shevtsov
Hi Rafael, You can try using correlated subquery instead of outer join. This can be slow with big tables though: SELECT * FROM users WHERE accept_email = 1 and email not in (SELECT email FROM sent_emails WHERE sent_emails .email = users.email AND messageID NOT LIKE = ‘XX’) OR OUTER JOIN

Re[2]: Simple query? Is it possible?

2005-05-09 Thread Vaidas Zilionis
Hello Roger, Monday, May 9, 2005, 2:56:18 PM, you wrote: Heh if i know page i would haven't problem. but i need to get also correct page with link doomain.con/items.php?showid=45 it can be anywhere! :) I making web application with data binding (IE stuff) data is loading very fast, can be

Re[3]: Simple query? Is it possible? (hm.. solution?, maybe can be better?)

2005-05-09 Thread Vaidas Zilionis
Hello Vaidas, Monday, May 9, 2005, 3:08:26 PM, you wrote: hm founded something intresting :) set @mynr:=0; Select @mynr as nr,table.id from table where @a:=IF((table.id=0),0,(@a+1)) having table.id=518 order by id strange IF hack :) main problem what this metod not fast. tested in table with

Re: very simple query but strange results

2004-08-30 Thread Rhino
- Original Message - From: Kapoor, Nishikant [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 30, 2004 2:41 PM Subject: very simple query but strange results This little sql has me puzzled. Would appreciate your help. mysql drop table if exists T; Query OK, 0 rows affected

Re: very simple query but strange results

2004-08-30 Thread Michael Stassen
Rhino wrote: - Original Message - From: Kapoor, Nishikant [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 30, 2004 2:41 PM Subject: very simple query but strange results This little sql has me puzzled. Would appreciate your help. mysql drop table if exists T; Query OK, 0

Re: very simple query but strange results

2004-08-30 Thread Rhino
: Michael Stassen [EMAIL PROTECTED] To: Rhino [EMAIL PROTECTED] Cc: Kapoor, Nishikant [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, August 30, 2004 7:12 PM Subject: Re: very simple query but strange results Rhino wrote: - Original Message - From: Kapoor, Nishikant [EMAIL

Re: very simple query question

2004-04-17 Thread Jigal van Hemert
i have a simple query select u.*,p.* from users u, profiles p where u.uname = p.uname and u.level != 0 Is there any tricks to make this use an index. If i do level=0 is uses an index , but != does not. MySQL only uses an index if it will return less than approx. 30% of the records. It

Re: Similar simple query slow down dramatically, by just select one more field, why?

2004-02-18 Thread Ludwig Pummer
Oscar Yen wrote: create table a ( imgid int not null, parent int, imgtype char(3), img longtext, primary key (imgid), key searchkey (parent, imgid) ) type = innodb; T1) select imgid, parent from a where parent = 10; returns 3357 rows in 0.08 sec. T2) select imgid, parent, imgtype

Re: Similar simple query slow down dramatically, by just select one more field, why?

2004-02-18 Thread Oscar Yen
N¬™ë,j°jËkj{zºÞw­…«k‰©oz»¢z ‰¦ºx†j×­˜úèThanks for reply. - Original Message - From: Ludwig Pummer [EMAIL PROTECTED] To: Oscar Yen [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, February 19, 2004 8:39 AM Subject: Re: Similar simple query slow down dramatically, by just

Re: Re: Simple query help

2003-08-30 Thread Boris Villazon
El vie, 29-08-2003 a las 22:05, Daniel Clark escribió: select value from tableName where date in (select max(date) from tableName where id = 4); But, it doesn't work with mysql 4.0. Any ideas? Does anybody had this problem before? What about: SELECT value, date FROM tablename

RE: A Simple Query!

2003-03-02 Thread Uttam
Hi Bruce, yep, u r right. Anyway, MySQL query optimizer will take care of it ;) regds, -Original Message- From: Bruce Feist [mailto:[EMAIL PROTECTED] Sent: Sunday, March 02, 2003 04:00 To: [EMAIL PROTECTED] Subject: Re: A Simple Query! Hello, Uttam; We can simplify this, actually

Re: A Simple Query!

2003-03-01 Thread Bruce Feist
Hello, Uttam; We can simplify this, actually... any time L.idFilm is NULL (i.e., no row in Loans is found), L.dateReturn will have to be NULL as well. So, specifying the L.idFilm IS NULL condition is redundant. It's sufficient to look only at L.dateReturn IS NULL in the WHERE clause. Yours

RE: A Simple Query!

2003-03-01 Thread Uttam
, 2003 08:13 To: [EMAIL PROTECTED] Subject: Re: A Simple Query! Hello, Remi; Try this; I *think* it'll work (but I'm also new to MySQL): select F.idFilm, F.title from Films F left join Loans L on F.idFilm = L.idFilm and L.dateReturn IS NULL where L.idFilm IS NULL; This provides an interesting

Re: A Simple Query!

2003-02-28 Thread Bruce Feist
Hello, Remi; Try this; I *think* it'll work (but I'm also new to MySQL): select F.idFilm, F.title from Films F left join Loans L on F.idFilm = L.idFilm and L.dateReturn IS NULL where L.idFilm IS NULL; This provides an interesting example of the difference between on and where, by the way; it

Re: A Simple Query!

2003-02-28 Thread Sam A. Funk
Hello, This is the way I normally do queries that would be solved with sub-selects in other products: SELECT F.idFilm, F.title FROM Films F, Loans L WHERE F.idFilm = L.idFilm AND L.dateReturn IS NULL; Sam A. Funk At 02:27 + 03/01/03, Remi Mikalsen wrote: Hello, I believe, and hope, I have a

RE: a simple query

2002-12-14 Thread Adolfo Bello
SELECT a.Name,b.Name,c.Name FROM your_table a LEFT OUTER JOIN your_table b ON a.Code=b.ParentFemale LEFT OUTER JOIN your_table c ON a.Code=c.ParentMale -Original Message- From: Fam. Tarniceru [mailto:[EMAIL PROTECTED]] Sent: Friday, December 13, 2002 3:39 PM To: MySQL Mailing List

Re: A simple query, please help

2002-06-14 Thread Gelu Gogancea
select version(); show create table ...; - Original Message - From: Vandana [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 7:01 PM Subject: A simple query, please help My table is as follows: Value Distance (float) (float)

Re: A simple query, please help (solved)

2002-06-14 Thread Vandana
Thanks a lot, it worked with the double datatype! On Fri, 14 Jun 2002, Michael Ivanyo wrote: I've had similar problems with this in my career and have come to the conclusion that one should always use double floats. The problem is typically due to round off errors of the float