[sqlite] Optimising a bad design decision

2011-02-01 Thread Ian Hardingham
Hey guys. First off, thanks to all who have helped me in the recent weeks. We're in crunch on my project and my rather complicated server, combined with my lack of DB experience, has given me plenty of problems to deal with. My core users table has a user defined by a string which is their

Re: [sqlite] Optimising a bad design decision

2011-02-01 Thread Drake Wilson
Quoth Ian Hardingham i...@omroth.com, on 2011-02-01 15:10:43 +: [paragraphs reordered] As there are hundreds of queries around my server codebase I would prefer not to have to change every single one to use a numeric id for a user rather than a string - but maybe this is the only real way

Re: [sqlite] Optimising a bad design decision

2011-02-01 Thread Igor Tandetnik
On 2/1/2011 10:10 AM, Ian Hardingham wrote: My core users table has a user defined by a string which is their name. This string is used to address many other tables relating to users. Not only is the primary key a string (which I understand is bad enough), but I also have to use LIKE rather

Re: [sqlite] Optimising a bad design decision

2011-02-01 Thread Ian Hardingham
Hi Igor, thankyou. If I wish to make this modification now, what steps would I need to take? And in your opinion what % of the optimisation of doing it with integers would this provide? Thanks, Ian On 01/02/2011 16:19, Igor Tandetnik wrote: On 2/1/2011 10:10 AM, Ian Hardingham wrote: My

Re: [sqlite] Optimising a bad design decision

2011-02-01 Thread Igor Tandetnik
On 2/1/2011 11:30 AM, Ian Hardingham wrote: If I wish to make this modification now, what steps would I need to take? Export data from the table, drop table, recreate table with the new schema, import data back. Update all queries from LIKE to =. And in your opinion what % of the

Re: [sqlite] Optimising a bad design decision

2011-02-01 Thread Puneet Kishor
On Tuesday, February 1, 2011 at 10:30 AM, Ian Hardingham wrote: Hi Igor, thankyou. If I wish to make this modification now, what steps would I need to take? And in your opinion what % of the optimisation of doing it with integers would this provide? ALTER TABLE MyTable RENAME TO

Re: [sqlite] Optimising a bad design decision

2011-02-01 Thread Ian Hardingham
Many thanks Puneet and Igor - I will do those things. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users