473,386 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Some slow-query-log entries don't make sense

Hi All,

I'm trying to use the slow-query-log (with
--log-queries-not-using-indexes enabled) to determine if any queries
need optimization, and have a few questions about some entries I'm
seeing.

First question: given a table defined as:

CREATE TABLE `oa_location` (
`rowid` int(11) NOT NULL auto_increment,
`pLocation` varchar(7) NOT NULL default '',
`cLocation` varchar(7) NOT NULL default '',
[...]
PRIMARY KEY (`rowid`),
KEY `oaloc001` (`pLocation`),
KEY `oaloc002` (`cLocation`),
KEY `oaloc003` (`locType`)
) ENGINE=MyISAM AUTO_INCREMENT=448 DEFAULT CHARSET=latin1

Why would this query appear in the slow-query-log:

# Query_time: 0 Lock_time: 0 Rows_sent: 6 Rows_examined: 6
select pLocation from oa_location order by pLocation;

This query apparently took no time, and it used an indexed field.

Second question: given a table defined as:

CREATE TABLE `oa_paycode` (
`payCode` smallint(4) unsigned zerofill NOT NULL default '0000',
`shortDesc` varchar(9) default NULL,
`longDesc` varchar(30) default NULL,
`visible` enum('Y','N') default 'Y',
PRIMARY KEY (`payCode`),
UNIQUE KEY `paycd001` (`payCode`),
KEY `paycd002` (`visible`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1

why would this query show up in the slow-query-log:
# Query_time: 0 Lock_time: 0 Rows_sent: 177 Rows_examined: 177
select * from oa_paycode;

Again, the query apparently took no time, and it presumably didn't need
an index (or used the primary key) since all records were requested.

Any explanations or advice would be greatly appreciated.

-Dave H.

Oct 11 '06 #1
0 2653

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: John Bailo | last post by:
Is it me? Or do Windows Forms run as slow as molasses? I launch a child form from a parent and it takes ages to appear? Why ?!?!
2
by: David | last post by:
Hi, We have an internal network of 3 users. Myself & one other currently have individual copies of the front-end MS Access forms and via our individual ODBC links we have used the: File > Get...
50
by: diffuser78 | last post by:
I have just started to learn python. Some said that its slow. Can somebody pin point the issue. Thans
3
by: michael | last post by:
Hi, I am trying to write an ASP.NET web app, in Visual Basic.NET, using Visual Studio.NET 2004, .NET framework 1.1.4322 SP1 Running the project/app on localhost while in dev/write/debug stage ...
1
by: pkochanek | last post by:
Hi, I've to implement fast library for big numbers arithmetics. I'll store the number in the table of unsigned long variables. And now i've a question: what will be faster: a) storing in one...
3
by: UJ | last post by:
I had somebody (who was an idiot) tell me that tables are slow in rendering? That you shouldn't do things like tables inside of tables. Is that true? I think she didn't know what she was...
4
by: jonceramic | last post by:
Hi all, I have a situation I can't find any old messages or web-help on. I have a split database with a bizarre quirk. When I open up the front-end file, the main form opens up fairly quickly...
13
by: eighthman11 | last post by:
using Access 2003 and sql server version 8.0 Hey everyone. Created a text box where the user types in an Inventory number and it takes them to that inventory number on the contimuous form. The...
10
by: penworthamnaynesh | last post by:
Does php slow your website down? This is what i would like to know.The reason is because my site is writtent 50% in html and 50% in php and is very slow at loading. And i cant tell wether php is...
4
by: plaguna | last post by:
My computer is very slow when some Windows applications are running. I defragmented and fixed bad sectors of the C: drive, I deleted open and running applications through regedit, I removed all the...
0
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
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...
0
BarryA
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...
0
marktang
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.