RE: Proper use of indexes / keys

2001-12-16 Thread Roger Baklund
* Sebastian Bergmann > Roger Baklund wrote: > > You can almost always improve the performance of queries by adding an > > index. The trick is to add the right index... :) If you for instance > > often did a "SELECT * FROM pot_accesslog WHERE client_id=$id AND > > timestamp > NOW() - INTERVAL 24 HO

Re: Proper use of indexes / keys

2001-12-16 Thread Sebastian Bergmann
Roger Baklund wrote: > However, if the behaviour with no restrictions on duplicates is > correct, you may be better of without a primary key in this case. Okay, that's what I need here. > Also, the second create statement defines indexes on all fields, making > almost any query reasonably fas

RE: Proper use of indexes / keys

2001-12-16 Thread Roger Baklund
* Sebastian Bergmann > I am currently trying to optimize the indexes / keys for the MySQL > schema of phpOpenTracker. I don't know phpOpenTracker, but I have a few comments. > I'm wondering if multiple keys, like > > CREATE TABLE pot_accesslog ( > accesslog_id int(10) unsigned NO