3,244 questions
1
vote
1
answer
81
views
Slow TimescaleDB lookup on indexed column (event_key) without a time filter
I'm using a self-hosted TimescaleDB instance to store logs. I have a hypertable logs that is partitioned by the timestamp column.
I need to perform a fast lookup query based on the event_key column, ...
0
votes
0
answers
42
views
Query Timeout in Athena while querying partition key names
I have an Athena table in my AWS account and I am using an S3 buckets as a database for which i have defined the schema in AWS glue. I currently have Hive style partitioning(manual partitionig) of ...
0
votes
0
answers
87
views
SQL Server partition table insert slow performance
I am having trouble with a table partitioning in SQL Server 2022. My partition function is based on a tinyint value which could be 1, 2, or 3. I have many other columns and there is no primary key, no ...
-1
votes
1
answer
71
views
PostgreSQL add column to Partition (for Table Inheritance)
Why isn't it possible to add a column to a partition?
From my point of view, the partitioning feature introduced in PostgreSQL is much more useful than table inheritance.
Table inheritance shoots at ...
0
votes
1
answer
159
views
How to set permissions on partitioned table in Postgres (v. 15)
How can I let user to update only one partition through a parent table? Why doesn't this work:
-- 1. Create users
CREATE ROLE my_admin LOGIN PASSWORD 'admin_pass';
CREATE ROLE my_user LOGIN PASSWORD '...
3
votes
2
answers
212
views
Postgres move partition to archive table
I have a main prod table which I am converting to partitions and am taking a deep dive into Postgres (v14) partitioning on an isolated test system.
On the test system I have two schemas a production ...
-4
votes
1
answer
280
views
How to count the number of subset partitions of {1..n} into two equal-sum subsets (modulo 10⁹+7) [closed]
I'm working on a combinatorics problem where I need to compute how many ways the set {1, 2, ..., n} can be divided into two subsets with equal sum, such that every number from 1 to n is in exactly one ...
0
votes
1
answer
106
views
How can I ensure that a partitioned asset in Dagster is in-sync with storage?
Say a partition from a Dagster asset was manually removed from storage. Could be because a scraper had saved some wrong data or similar and someone deleted it manually (without using the Dagster UI).
...
13
votes
6
answers
420
views
How can I divide a list of electrical loads into 3 groups with near-equal total sum using Python?
I'm an electrician working toward becoming an electrical engineer. I have some basic knowledge of Python and am trying to automate a tedious process we often face in the field.
In 3-phase electrical ...
0
votes
1
answer
65
views
How to associate unmounted Volume ID with disk partition number in Windows?
In Windows, mountvol uses volume IDs to determine partitions to mount for a disk. It shows any existing mount points for the volumes:
Possible values for VolumeName along with current mount points are:...
2
votes
1
answer
37
views
Control Spark Join Hash Partitioning
I have three dataframes A, B, and C.
I need to join dataframes A and B on columns [a, b] and dataframes A and C on columns [a, c].
I would like to force Spark to only hash-partition the three ...
0
votes
0
answers
27
views
Kafka Consumer unable to read messages because of partitions
I have written sample Kafka Producer application without mentioning partition which sends message to Consumer application.
My Consumer application is written using Kafka Streams as it is using state ...
0
votes
0
answers
19
views
Dividing area smoothly with curves using a few points (like in Steel Division 2)
The game Steel Division 2 has a very nice looking frontline system, where a smoothly curved line is drawn between friendly and enemy units, dividing the map into territorty owned by two teams.
Does ...
1
vote
1
answer
131
views
Weird query plan for "manually partitioned" table in redshift
Since AWS Redshift doesn't support native table partitioning, I implemented what in some places is called "manual partitioning" (eg.: here); in short:
Instead of creating a big time-series ...
-1
votes
1
answer
54
views
How to manage shard mechanism into the tables?
I have a database with 100 million records and 10 tables. Out of these, I’ve applied sharding (based on geo-location) to only 3 tables. The remaining tables are not sharded.
Now, if I want to run a ...