back to first page[..][[BR]] back to ["RHT"][[BR]] {{{ #!sql -- script de calcul des distances sources set search_path to rht,public; select cast(ltree2text(subltree(chemin,0,1)) as integer) from rht_topology limit 10 /* AJOUT D'UN INDEX ltree supports several types of indexes that can speed up the indicated operators: B-tree index over ltree: <, <=, =, >=, > GiST index over ltree: <, <=, =, >=, >, @>, <@, @, ~, ? */ CREATE INDEX chemin_btee_index ON rht.rht_topology USING btree(chemin); --27688 ms VACUUM ANALYSE rht.rht_topology; CREATE INDEX chemin_gist_index ON rht.rht_topology USING GIST (chemin); -- fait planter mon serveur.... SELECT chemin from rht.rht_topology where chemin <@ '212340'; -- tronçon source de la Vilaine -- 2360 }}}