hi for all possible tags i use: all_tags = db().select(db.t_tag.f_name,distinct=True)
in database i have first table games with filds title, age, group, instruction and i have also two other tables: tags and equipment and when i show the data, i'm using Datatables (with general search and searching in columns). in Datatables ( plug-in for the jQuery <http://www.jquery.com/>) i have columns: title, age, group, instruction, tags, equipment. id | title | age | group | instruction | tags | equipment --------------------------------------------------------------------------- 1 | | | | | | and for Datatables (and efficient search) i have to get all the games (1000) with all attributes including equipment and tags for every game. and there i have 1 select for all games and 1000 selects for tags (for every game one select) and 1000 selects for equipment (for every game one) if it possible to make this faster with joins, how? do you recomend to chache this select? do you recomend going back to list:string for tags and equipment. what is the advantage of example in the book (what i'm using, tags in different table) over tags in list:string field andrej On Thursday, October 18, 2012 2:20:21 PM UTC+2, Massimo Di Pierro wrote: > > I understand you want to select all possible tags. I suggest you create a > table that stores all posible tags and when a new tag is created you insert > a new record there. You can get all possible tags with a single select from > this table. You can also cache that select. > > > On Thursday, 18 October 2012 02:56:17 UTC-5, andrej burja wrote: >> >> hi >> >> system: it is on linode 512, os ubuntu, server apache, database postgresql >> my initial design was using list:string, but than i saw example in the >> book (Application-Development-Cookbook) and i thought this is better >> purpose of that code: user testing reveals, that the best way to search >> the data is with Datatables (+individual column filtering). i have 1000 >> games with different attributes: name, for what age, how big the group can >> be, equipment, tags, instructions. I have to put all the attributes in >> table. >> .. and there is another problem: tags and equipment have both the same >> implementation - so actualy i do 2000 selects :( >> >> andrej >> >> On Thursday, October 18, 2012 4:09:59 AM UTC+2, rochacbruno wrote: >>> >>> I am using list:string for tags and it is working very well for my >>> needs. >> >> --