Domande taggate «postgresql-9.6»





1
Nest Nest indesiderato vs. Hash Iscriviti in PostgreSQL 9.6
Ho un problema con la pianificazione delle query PostgreSQL 9.6. La mia query è simile alla seguente: SET role plain_user; SELECT properties.* FROM properties JOIN entries_properties ON properties.id = entries_properties.property_id JOIN structures ON structures.id = entries_properties.entry_id WHERE structures."STRUKTURBERICHT" != '' AND properties."COMPOSITION" LIKE 'Mo%' AND ( properties."NAME" LIKE '%VASP-ase-preopt%' OR …

2
Come rendere DISTINCT ON più veloce in PostgreSQL?
Ho una tabella station_logsin un database PostgreSQL 9.6: Column | Type | ---------------+-----------------------------+ id | bigint | bigserial station_id | integer | not null submitted_at | timestamp without time zone | level_sensor | double precision | Indexes: "station_logs_pkey" PRIMARY KEY, btree (id) "uniq_sid_sat" UNIQUE CONSTRAINT, btree (station_id, submitted_at) Sto cercando …

3
Query JOIN semplice molto lenta
Struttura DB semplice (per un forum online): CREATE TABLE users ( id integer NOT NULL PRIMARY KEY, username text ); CREATE INDEX ON users (username); CREATE TABLE posts ( id integer NOT NULL PRIMARY KEY, thread_id integer NOT NULL REFERENCES threads (id), user_id integer NOT NULL REFERENCES users (id), date …

1
Vincolo di partizione non utilizzato per join che coinvolgono tabelle partizionate da timestamp
Ho una struttura di tabella partizionata come: CREATE TABLE measurements ( sensor_id bigint, tx timestamp, measurement int ); CREATE TABLE measurements_201201( CHECK (tx >= '2012-01-01 00:00:00'::timestamp without time zone AND tx < ('2012-01-01 00:00:00'::timestamp without time zone + '1 mon'::interval)) )INHERITS (measurements); CREATE INDEX ON measurements_201201(sensor_id); CREATE INDEX ON measurements_201201(tx); …


Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.