Closed dmarkic closed 7 years ago
Thanks for the feedback. I will change it to int(10). Unlikely I will touch timestamp as VARCHAR seems ok. If I change it to TIMESTAMP, It will break a lot of stuff.
Hello, well, timestamp could be unsigned int - that's 4 bytes. VARCHAR(10) takes 11 bytes (on utf8 3-4 times more), so as much as 41 bytes. That's a huge difference.
I see. So should int(10) works better or bigint(20) just in case?
int(10) is enough: https://dev.mysql.com/doc/refman/5.7/en/integer-types.html
Hello,
is there any special reason why columns pollip_qid and pollip_aid in pollsip table are VARCHAR and not INT? Also pollip_timestamp is VARCHAR which is rather strange. Also in pollsq table you have pollq_expiry which seems to be timestamp, stored as varchar.
Could you update those, as you're using ints in your code and indexes don't work if you do polla_qid = 10 and polla_qid is VARCHAR as it needs to convert the value being searched.
Best regards, Dejan