umpirsky / country-list

:globe_with_meridians: List of all countries with names and ISO 3166-1 codes in all languages and data formats.
MIT License
5.16k stars 1.55k forks source link

changed primary key to fixed-length CHAR(2) instead of VARCHAR(2) #8

Closed phjardas closed 11 years ago

phjardas commented 11 years ago

improves space usage and performance

phjardas commented 11 years ago

OK, now that I had a look at the source code and how the data is created, this pull request is probably stupid, because its editing a generated file. :-) Please disregard this pull request and consider issue #8 instead.

umpirsky commented 11 years ago

You can check SqlExporter, it can be maybe fixed in MySql, but this is not a problem, since this table is just a temporary holder, it's easy to alter or select-insert into another table.

Thanks.

phjardas commented 11 years ago

I have no idea of the DBO wrapper you're using so I'll better keep my hands off. Should be easy to change the column decoration for someone who knows the PHP syntax.

On a side note, if you conveniently prepare database import statements for all kinds of databases, do you really expect people to consider these tables as temporary holders?

umpirsky commented 11 years ago

Yes :)

Well, honestly, I didn't think about optimization, this was quick and dirty one day project. I opened the source, if someone wants to improve it, I will be happy to merge.

Thanks for bringing this up, I knew about this issue, if I have some time, I will try to fix it soon. :+1: