1
vote
0answers
39 views

Should one always VACUUM ANALYZE before REINDEXing in PostgreSQL 8.4?

Early in the morning every day a pgAgent job refreshes the contents of table A from table B on my PostgreSQL 8.4 database. Table A contains around 140k records across 91 columns and has two indexes - ...
0
votes
2answers
157 views

Run query faster, what index to use

I have a table with 85M rows : CREATE TABLE emissions_totales ( "schema_source" varchar(150), "snap" varchar(20), "gid" varchar(255), "polluant" varchar(50), "emi" float8, "numreg" varchar(3), ...
5
votes
2answers
414 views

Custom unique column constraint, only enforced if one column has a specific value

Is it possible to have a custom unique column constraint as follows? Suppose I have two cols, subset and type, both strings (though the data types probably doesn't matter). If type is "true", then ...