Home » Performance » MySQL » Query with joins repeats first match
Query with joins repeats first match [message #448] Tue, 05 December 2006 06:12 Go to next message
migandhi  is currently offline migandhi
Messages: 9
Registered: December 2006
Junior Member
i am facing a problem in a join query .
it contains multiple joins .
the output for example is like ,
---------------------------------------
10 abc 123

10 abc 123

10 abc 123
---------------------------------------

and so on ....

i tried it with and without indexing .
but the result set is the same.
the first match in the query is repeated .
the tables are Innodb type , which would also permit foreign key.
i am working on version 5.0




Re: Query with joins repeats first match [message #450 is a reply to message #448 ] Tue, 05 December 2006 06:56 Go to previous messageGo to next message
Peter  is currently offline Peter
Messages: 405
Registered: August 2006
Senior Member
Super Guru
You should supply your schema and explain for your query if you want reasonable answer.


Peter Zaitsev, MySQL Performance Expert
MySQL Performance Blog - http://www.mysqlperformanceblog.com
MySQL Consulting http://www.mysqlperformanceblog.com/mysql-consulting/
Re: Query with joins repeats first match [message #452 is a reply to message #450 ] Tue, 05 December 2006 10:13 Go to previous messageGo to next message
migandhi  is currently offline migandhi
Messages: 9
Registered: December 2006
Junior Member
Sir ,
Please see attached Explain result.
And i hope it is useful.

  • Attachment: Explain.txt
    (Size: 2.09KB, Downloaded 170 time(s))

Re: Query with joins repeats first match [message #458 is a reply to message #452 ] Thu, 07 December 2006 18:25 Go to previous messageGo to next message
carpii  is currently offline carpii
Messages: 48
Registered: November 2006
Member
Why so reluctant to post a proper question?

Remember, garbage in == garbage out Razz

Nobody can help you properly if you dont post your schema (table design), query and explain output.

Youve only posted your explain
Re: Query with joins repeats first match [message #459 is a reply to message #452 ] Fri, 08 December 2006 13:40 Go to previous messageGo to next message
Peter  is currently offline Peter
Messages: 405
Registered: August 2006
Senior Member
Super Guru
You did not send the query but explain is absolutely horrible.
Join is going to be done without indexes for all tables.

You need to have much better indexing.


Peter Zaitsev, MySQL Performance Expert
MySQL Performance Blog - http://www.mysqlperformanceblog.com
MySQL Consulting http://www.mysqlperformanceblog.com/mysql-consulting/
Re: Query with joins repeats first match [message #502 is a reply to message #450 ] Sat, 23 December 2006 00:35 Go to previous message
migandhi  is currently offline migandhi
Messages: 9
Registered: December 2006
Junior Member
Hi,
i found out the issues that were leading to it.
1: redundant data in one of the tables .
2: Use of IS NULL in conditions.

So the JOINS work normally . And i also have to say it is fast .


thanks.
Previous Topic:Assistance Needed with Table Corruption
Next Topic:OR & AND?
Goto Forum:
  


Current Time: Fri Jul 10 01:33:06 EDT 2009

Total time taken to generate the page: 0.01189 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.