Subject | Re: [firebird-support] Sloooow query |
---|---|
Author | Arno Brinkman |
Post date | 2003-06-26T07:28:55Z |
Hi,
different plan in the end)
around 400 matching the result)
What's the DDL for this index : IND_CATEGORYLIST_CATEGORYID ?
Regards,
Arno
> Having a problem with a slow query in FireBird.to execute this query on a 2.4 GHz machine!
>
> MySQL takes only 0.1seconds, but FireBird takes a whopping 31.5 seconds
> Even if I specify a PLAN things don't improve much. (It seems to evencompletely ignore my custom plans sometimes, reporting a completely
different plan in the end)
>around 8000 records (But only about 3000 records matching the join, and only
> The songlist table contains about 5000 entries, and the categorylist table
around 400 matching the result)
>songlist.artist
> Any clues on why this is so slow?
>
> =============================
> SELECT
> FIRST 100 categorylist.ID as listID, songlist.ID as songID,
> FROM(IND_CATEGORYLIST_CATEGORYID)))
> songlist join categorylist on (songlist.ID = categorylist.songID)
> WHERE
> (categorylist.categoryID = 8)
> AND (date_played < '06/25/2003 10:12:24.081')
> AND (date_artist_played < '06/25/2003 12:12:24.081')
> AND (status = 0)
> AND (artist <> '')
> AND (artist <> 'Elton John')
> ORDER BY balance ASC, weight DESC
>
> PLAN:
>
> PLAN SORT (JOIN (SONGLIST NATURAL,CATEGORYLIST INDEX
What's the DDL for this index : IND_CATEGORYLIST_CATEGORYID ?
Regards,
Arno