Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TYPE float3d AS (
- x real,
- y real,
- z real);
- SELECT t1.id, t1.parent_id, (t1.location).x, (t1.location).y, (t1.location).z,
- t1.confidence, t1.radius, t1.skeleton_id, t1.user_id,
- t2.id, t2.parent_id, (t2.location).x, (t2.location).y, (t2.location).z,
- t2.confidence, t2.radius, t2.skeleton_id, t2.user_id
- FROM treenode t1
- INNER JOIN treenode t2 ON
- ( (t1.id = t2.parent_id OR t1.parent_id = t2.id)
- OR (t1.parent_id IS NULL AND t1.id = t2.id))
- WHERE (t1.LOCATION).z = 41000.0
- AND (t1.LOCATION).x > 2822.6
- AND (t1.LOCATION).x < 62680.2
- AND (t1.LOCATION).y > 33629.8
- AND (t1.LOCATION).y < 65458.6
- AND t1.project_id = 1 LIMIT 5000;
- Column | Type | Modifiers
- ---------------+--------------------------+-------------------------------------------------------
- id | bigint | not null default nextval('location_id_seq'::regclass)
- user_id | integer | not null
- creation_time | timestamp with time zone | not null default now()
- edition_time | timestamp with time zone | not null default now()
- project_id | integer | not null
- location | float3d | not null
- editor_id | integer |
- parent_id | bigint |
- radius | real | not null default 0
- confidence | smallint | not null default 5
- skeleton_id | integer | not null
- Indexes:
- "treenode_pkey" PRIMARY KEY, btree (id)
- "treenode_parent_id" btree (parent_id)
- "treenode_project_id_location_x_index" btree (project_id, ((location).x))
- "treenode_project_id_location_y_index" btree (project_id, ((location).y))
- "treenode_project_id_location_z_index" btree (project_id, ((location).z))
- "treenode_project_id_skeleton_id_index" btree (project_id, skeleton_id)
- "treenode_project_id_user_id_index" btree (project_id, user_id)
- "treenode_skeleton_id_index" btree (skeleton_id)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement