Skip to content

Q: time-field/index on observation table? #3

@justb4

Description

@justb4

(with @tomvantilburg at OSGeo.org codesprint Bonn) wondering: we see no time-field nor index on time in observation table.

CREATE TABLE observation
(
  id bigserial NOT NULL,
  data jsonb,
  stream_id bigint,
  featureofinterest_id bigint,
  CONSTRAINT observation_pkey PRIMARY KEY (id),
  CONSTRAINT fk_datastream FOREIGN KEY (stream_id)
      REFERENCES datastream (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE CASCADE,
  CONSTRAINT fk_featureofinterest FOREIGN KEY (featureofinterest_id)
      REFERENCES featureofinterest (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE CASCADE
)
WITH (
  OIDS=FALSE
);

Are time fields within the jsonb data field? How would this impact performance with queries on timeranges e.g.?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions