Our system writes a lots of data (kind of Big Data system). Write performance is good enough for our needs but read performance is really too slow.
The primary key (constraint) structure is similar ...
Asking this question, specifically for Postgres, as it has good supoort for R-tree/spatial indexes.
We have the following table with a tree structure (Nested Set model) of words and their frequencies:...
I have a tickets table with an id that I need to associate to a lookup table where the counterpart of that data is another id that is controlled from an outside source.
Some RDBMS's seem to allow a query without a FROM clause, eg:
postgres=# SELECT 'foo' bar;
│ bar │
│ foo │
But for those that allow it, why would SELECT count(*) not return 0?...
if we have a table T1 with columns A,B,C,D,E and an index ( A,B,C) built for it
if we a SQL query joining on columns A,B or A,B,C or A, this index can still be used, but if the query is joining on B ...
I need to search a very big PostgreSQL table (500+M rows), I want to limit the returned search results, but using the "limit" keyword cant prevent the search over the whole set of data(is it correct?)
I always learned and understood that an index can only be used when we have predicates for the leading (or all) columns. Now, to my surprise, I noticed that a GiST index is used in the following query....
I'm managing a table with several million records which are being inserted in real time. A part of my app needs to display the last N inserted rows, so at the beginning I just queried for:
select id, ...
I'm having a problem with writing a Postgres query that really appreciates anyone's help. I have 3 tables related to each other as below:
owner (foreign key, to ...