As much of this question relates to mysql, it may be OT?
I'm trying to make a search engine for a reasonably complex database that
was originally developed by someone else in Access. I've ported the data to
mySQL and am reasonably happy with everything except the performance I'm
getting from queries with multpile joins. Although the database is fairly
complex, it's not very large (less than 2 Mb as an Access db, less than that
in mysql tables). Doing a query with a single joined table is fast, two
joined tables is around 2 seconds, and three joined tables takes 12 seconds.
Here's an example of the query:
SELECT tus_site.arsi_database_id, tus_site.arsi_local_site_num,
tus_site.arsi_initial_site_num FROM tus_site INNER JOIN site_name_common ON
tus_site.arsi_database_id=site_name_common.sinaco_ arsi_database_id INNER
JOIN site_name_alternate ON
tus_site.arsi_database_id=site_name_alternate.sina alt_arsi_database_id INNER
JOIN oral_history ON
tus_site.arsi_database_id=oral_history.orhi_arsi_d atabase_id
I tried adding a where clause in this, and it was slow enough I had to kill
the mysql process and start again.
There are four tables:
tus_site
site_name_common
site_name_alternate
oral_history
Eventually, I'll have to add a couple of extra tables to the query.and build
an extremely long complex WHERE clause to it. I've done similar queries
using access, ms sql server and oracle and they've ripped through the
queries in milliseconds. Does anyone have any hints on how to get this to
work better with mysql or any other rdbms that won't require an insane
investment in software (the specs for this project state that it must run
from a DVD on each computer). Or is there anything I'm obviously doing
wrong here? I can't believe that mysql can't handle queries like this -
there must be some kind of user error involved? 3 2251
Zaphod Beeblebrox <fo*@spamsnothere.org> wrote in message
news:zUJHb.852187$pl3.192715@pd7tw3no... As much of this question relates to mysql, it may be OT?
I'm trying to make a search engine for a reasonably complex database that was originally developed by someone else in Access. I've ported the data
to mySQL and am reasonably happy with everything except the performance I'm getting from queries with multpile joins. Although the database is fairly complex, it's not very large (less than 2 Mb as an Access db, less than
that in mysql tables). Doing a query with a single joined table is fast, two joined tables is around 2 seconds, and three joined tables takes 12
seconds. Here's an example of the query:
SELECT tus_site.arsi_database_id, tus_site.arsi_local_site_num, tus_site.arsi_initial_site_num FROM tus_site INNER JOIN site_name_common
ON tus_site.arsi_database_id=site_name_common.sinaco_ arsi_database_id INNER JOIN site_name_alternate ON tus_site.arsi_database_id=site_name_alternate.sina alt_arsi_database_id
INNER JOIN oral_history ON tus_site.arsi_database_id=oral_history.orhi_arsi_d atabase_id
I tried adding a where clause in this, and it was slow enough I had to
kill the mysql process and start again.
There are four tables: tus_site site_name_common site_name_alternate oral_history
Eventually, I'll have to add a couple of extra tables to the query.and
build an extremely long complex WHERE clause to it. I've done similar queries using access, ms sql server and oracle and they've ripped through the queries in milliseconds. Does anyone have any hints on how to get this to work better with mysql or any other rdbms that won't require an insane investment in software (the specs for this project state that it must run from a DVD on each computer). Or is there anything I'm obviously doing wrong here? I can't believe that mysql can't handle queries like this - there must be some kind of user error involved?
AHA! I figured it out. No indexes on the tables from the conversion from
Access to mySQL. Adding an index to the pk in the tus_site table made the
query almost instantaneous! wooohooo, life is good :)
Wow... People still read Douglas Adams after all those years...
"Zaphod Beeblebrox" <fo*@spamsnothere.org> wrote
in message news:<zUJHb.852187$pl3.192715@pd7tw3no>... I'm trying to make a search engine for a reasonably complex database that was originally developed by someone else in Access. I've ported the data to mySQL and am reasonably happy with everything except the performance I'm getting from queries with multpile joins.
Index all fields referenced in JOIN, WHERE, GROUP BY, and ORDER BY
clauses.
Cheers,
NC
Nikolai Chuvakhin <nc@iname.com> wrote in message
news:32**************************@posting.google.c om... Wow... People still read Douglas Adams after all those years...
Yes, though I still prefer the radio play done by the bbc.
"Zaphod Beeblebrox" <fo*@spamsnothere.org> wrote in message news:<zUJHb.852187$pl3.192715@pd7tw3no>... I'm trying to make a search engine for a reasonably complex database
that was originally developed by someone else in Access. I've ported the
data to mySQL and am reasonably happy with everything except the performance I'm getting from queries with multpile joins.
Index all fields referenced in JOIN, WHERE, GROUP BY, and ORDER BY clauses.
Cheers, NC This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Sai Hertz And Control Systems |
last post by:
Dear all,
Their was a huge rore about MySQL recently for something in java functions
now theirs one more
http://www.mysql.com/doc/en/News-5.0.x.html
Does this concern anyone.
What I...
|
by: Bob Powell |
last post by:
To whom it may concern:
I find the recent articles in various trade publications a little
disturbing due to the lack of PostgrSQL mention. I continue to see
articles about how IBM may be...
|
by: sathyashrayan |
last post by:
dear group,
I have been working VC++ for some time. My company assigned me a task for
an online dictionary search
site similar to the onelook.com which I have to make it in php mysql. Since
I...
|
by: Martien van Wanrooij |
last post by:
I have been using phpdig in some websites but now I stored a lot of larger
texts into a mysql database. In the phpdig search engine, when you entered a
search word, the page where the search word...
|
by: taras.di |
last post by:
I'm trying to understand why MySQL isn't using all parts of the primary
key when I add in an OR statement in the query.
I have a people database, and a distances database. The people database...
|
by: John |
last post by:
http://www.teenwag.com/search?q=sports+illustrated&btn=Search
http://www.teenwag.com/search?q=%09+Antonella+Barba&btn=Search
http://www.teenwag.com/search?q=%09+Anna+Nicole+smith&btn=Search
...
|
by: kbipul |
last post by:
Hi
In a web application , I need to create an aspx page(in C#) which can serach the files present on the server at the specified locations.
The search parameter may be the file name, extn name,...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |