Hi,
I have a tree-structure managed with ltree and gist index.
Simplified schema is
CREATE TABLE crt (
idcrt INT NOT NULL,
...
pathname LTREE
)
idcrt primary key and other index ix_crt_pathname on pathname with gist
CREATE TABLE doc (
iddoc INT NOT NULL, ...)
iddoc primary key
CREATE TABLE folder_document (
id_folder int not null,
id_document int not null,
...
path_folder ltree not null
);
id_folder , id_document are primary key
ix_folder_document_path_folder on path_folder with gist
when enable_bitmapscan is set on query go on 1000 seconds, when I turned
off bitmapscan query go on