#1 2015-02-26 12:22:10

EgorovAlex
Member
Registered: 2015-02-18
Posts: 43

Questions about TSQLRecord

As usual some questions from beginner of mORMot:

1. I have TSQLRec with property Parent: TID;
Every record have parent record (tree structure)
and most searches will be by Parent,
should I mark this Parent field as "stored AS_UNIQUE" to improve speed of search?
2. If I do that with already created database, will be added index automatically?
3. Also my records have property Flags: set of (some flags from enum type);
This is possible to make search for this field and how?
Or I should declare it using another notation?

Offline

#2 2015-02-26 13:46:13

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,231
Website

Re: Questions about TSQLRecord

1. and 2. http://synopse.info/files/html/Synopse% … l#TITLE_51

3. No index by default - you have to add it yourself.
For searching, use the binary representation: it is stored as integer, one bit per item in the set.

Offline

Board footer

Powered by FluxBB