Results 1 to 1 of 1
Thread: Optmizing DB
Feb 8, 2006, 19:37 #1
- Join Date
- Jul 2002
- 0 Post(s)
- 0 Thread(s)
I'm optimising a website I recently purchased which has a large php/mysql backend.
I've made considerable improvements to it's performance, but I have a couple of questions.
First, there is a db table of about 500megs (5 million records), which has a "ip address" field. it's a varchar(32). This could be a varchar(16) but it won't actually save any disk space will it?
I was thinking I could use iptolong() php function and change it to a long, then store the value as a int(). The int would save a small amount of disc space.
Would a index on a INT be quicker than a index on a varchar()? I do alot of searchs/groupings etc on the ip address so optmising this is important.