Subject | how do i speed this up? |
---|---|
Author | martinknappe |
Post date | 2006-10-08T12:39:04Z |
hi,
i have here the script of a database:
http://www.yourfilehost.com/media.php?cat=other&file=script.sql
now, i've created the database and inserted some 200 000 random
entries in table 'dicentries'
when i execute the following query:
select first 1 id from dicentries where (asterm = '' and id > 0)
or
(asterm > '' and id > 0) order by asterm ascending, id ascending
it takes around 8 seconds to execute!
will i have to put up with this or does any of you see a way to speed
this up?
thanx very much,
martin
i have here the script of a database:
http://www.yourfilehost.com/media.php?cat=other&file=script.sql
now, i've created the database and inserted some 200 000 random
entries in table 'dicentries'
when i execute the following query:
select first 1 id from dicentries where (asterm = '' and id > 0)
or
(asterm > '' and id > 0) order by asterm ascending, id ascending
it takes around 8 seconds to execute!
will i have to put up with this or does any of you see a way to speed
this up?
thanx very much,
martin