[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: SQL question
- Subject: Re: SQL question
- From: Stuart Grimshaw
- Date: Sun, 09 May 2004 13:29:00 +0000
On Sun, May 09, 2004 at 09:27:51AM +0000, Stuart Grimshaw wrote:
> On Sat, May 08, 2004 at 11:53:45PM +0100, James Traynor wrote:
> > I am running some queries on the tables created by the
xapdblogger
> > (mysql) and have come across an oddity that there is probably a
really
> > simple explanation to.
> >
> >
> > select header_id from messageheader where
source="mi4.weather.egll"
> > order by header_id desc limit 1;
> >
> > takes 9 seconds
>
> How much data is there in the table? I assume header_id &
source are both
indexed? 9 seconds is a hell of a long time for a query.
>
If you prepend "explain" to the query, it will tell you what it's
doing and what
indexes it's using etc.
Prepend explain to both those queries & mail it to me, or the list
if you
prefer.
--
-S
xAP_Development Main Index |
xAP_Development Thread Index |
xAP_Development Home |
Archives Home
|