The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[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

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.