Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
GeXus
Forum Regular
Posts: 631 Joined: Sat Mar 11, 2006 8:59 am
Post
by GeXus » Mon Dec 17, 2007 12:21 am
I've been having really slow queries when doing joins.. specifically I'm joining to a highly transactional table - is it common to have slow queries in cases like that? All my indexes are setup properly as well.
Benjamin
Site Administrator
Posts: 6935 Joined: Sun May 19, 2002 10:24 pm
Post
by Benjamin » Mon Dec 17, 2007 12:33 am
What type of table is it? You may be having issues with it being locked as well.
CoderGoblin
DevNet Resident
Posts: 1425 Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany
Post
by CoderGoblin » Mon Dec 17, 2007 3:48 am
Also are you returning just the information you want ? Using "SELECT *" often slows queries down considerably if there are a lot of columns involved.
Generally when asking questions like this it helps us to have more details such as an example to comment on.
chakhar86
Forum Commoner
Posts: 45 Joined: Mon Jun 05, 2006 1:36 am
Contact:
Post
by chakhar86 » Mon Dec 17, 2007 8:46 am
Maybe you use non-integer primary/foreign key (or index) its dragging down performance of database.
Make sure you only use integer type for key field