http://qs321.pair.com?node_id=397431


in reply to Re: Does DBI handle table alias?
in thread Does DBI handle table alias?

I am not exactly sure what you mean by a plain index, but I am pretty sure that adding a clustering index on a field that is already indexed will not really accomplish anything. I could be confusing myself though.

At this point I think there are two places to looking. First, run the query through whatever explain utilities are available on your DBMS. This may give you some insight into what other optimizations may be useful. This was suggested in a previous post, but may have gotten lost in the shuffle. The other thing to consider is if you have any sort of hardware limitation. E.g. are you running out of RAM on that machine?

After that, you are going to want to look at if there any database specific options/features you can turn on that may help your query. This type of thing is inherently database specific, and each database usually has a slew of different things you can try. You probably want to find some good perfomance tuning books/references for your database.

I am a DBA neophyte, so I do not really know if your performance requirements of .5s are reasonable. I will say that 30s for that query sounds like a pretty long time to me.