Query optimization about cube

From: Enes Özdeniz <enesozdeniz(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Query optimization about cube
Date: 2024-12-16 11:12:32
Message-ID: CANeLGgQUc8t0-hSoEh0-OvkmkJ2xjprkSS1aD2qF_WoiZC+w+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello, I am working on query time optimization on some data structures. I
am recently working on multi dimensional queries. I am using cube to multi
dimensions. I have a table in my database what named points and it has a
column what named point. Point column has 10 dimensions. I can perform a
database query as written below;

SELECT *
FROM points
WHERE point && CUBE(ARRAY[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ARRAY[15, 15, 15,
15, 15, 15, 15, 15, 15, 15]);

However, I want to perform this query by removing some dimensions from the
query. When I search online and ask ai it seems the only solution is to set
the minimum and maximum integers of the columns I want removed from the
query. But this effect the performance of query time. Just as we do not
include some columns in the query when querying an ordinary database table,
here too I do not want to include some dimensions in the query. In this
way, I want to get rid of the query load of dimensions that I do not
include in the query. Is there a way I can perform queries this way?

Note: I will use the findings here for a scientific study.

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2024-12-16 11:20:39 Re: remove pgrminclude?
Previous Message vignesh C 2024-12-16 11:04:45 Re: Added schema level support for publication.