Re: [PERFORM] Varchar vs foreign key vs enumerator - table and index size

2013-09-02 Thread Łukasz Walkowski
On 1 wrz 2013, at 05:10, Vitalii Tymchyshyn wrote: > > > Well, there are some more options: > a) Store int keys and do mapping in the application (e.g. with java enums). > This can save you a join, that is especially useful if you are going to do > paged output with limit/offset scenario. Opt

Re: [PERFORM] Varchar vs foreign key vs enumerator - table and index size

2013-09-02 Thread Łukasz Walkowski
On 1 wrz 2013, at 03:31, Craig James wrote: > If your applications are read-heavy and only have a small-ish amount of code > that inserts/updates the table, it may not be that much of a rewrite. You can > create a integer/varchar table of key/values, use its key to replace the > current varch

Re: [PERFORM] Varchar vs foreign key vs enumerator - table and index size

2013-08-31 Thread Łukasz Walkowski
Tom, > If you're starting to be concerned about space, it's definitely time to > get away from this choice. Depending on what locale you're using, > comparing varchar values can be quite an expensive operation, too. I don't like wasting space and processing power even if more work is required t

[PERFORM] Varchar vs foreign key vs enumerator - table and index size

2013-08-31 Thread Łukasz Walkowski
Hi, This is my first post on this group so welcome everyone! Currently I'm working on optimizing a quite simple database used to store events from one website. Every event is a set of data describing user behaviour. The main table that stores all events is built using schema: Column