I am building a database that is going to be used to produce a list of items on my website. The list is created depending on how the user wants the list sorted. For example, lets say I am going to list groceries that are available in my store. Users will typically select the type of grocery they want to see, like list all the fruits, or a list all vegatables.

Here is an example table:

COLUMNS:
grocery_type, description, price

ROWS:
fruit, apple, 1.23
fruit, banana, 5.35
vegetable, carrot,  1.55
vegetable, spinach, 6.85

-- HERE IS MY QUESTION: --
Is faster for the sqlite database to have the grocery_type as a string or integer?
Or is the speed difference so small it doesn't matter?

Like instead of having "fruit" in the grocery_type column, I could have it as a "1" type, vegetables would be "2", and then translate that just before spitting out the table to my web page.

Thanks -
Shorty

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to