1,110 questions
2
votes
0
answers
357
views
sqlalchemy - select from partition
I have the following query (mysql):
SELECT *
FROM people PARTITION (p202108, p202109)
WHERE city='new york'
here it is in my python code - using sqlalchemy, but I didn't find how to add the ...
1
vote
1
answer
573
views
Automatically add partition conditions to WHERE clause
I have a columnar table that is partitioned by day and hour. It is stored on S3 in parquet files to be queried by Athena. Here is the CREATE TABLE:
CREATE EXTERNAL TABLE foo (
-- other columns here
...
5
votes
1
answer
16k
views
How to alter partition in postgresql
Actually I am new to PostgreSQL. I want to alter existing partition to increase range value. For example I have below partition
PQR_271 FOR VALUES FROM ('260000000') TO ('270000000')
Here I want to ...
0
votes
1
answer
179
views
How to use "create table as" with dates that is aggregated through group by in SQL?
Given a data that looks as follows where the date is in string format YYYYMMDD:
item
vietnamese
cost
unique_id
sales_date
fruits
trai cay
10
abc123
20211001
fruits
trai cay
8
foo99
20211001
fruits
...
0
votes
1
answer
2k
views
How to perform a SQL PARTITION on KUSTO without using partition?
I would like to perform a SELECT with a RANK() OVER (PARTITION BY [ID] ORDER BY [EventId] desc) on Kusto, but with the "partition" operator I am limited to max 64 distinct rows. Is it ...
0
votes
1
answer
45
views
Partitioning with the choice of records by combination of fields (sql)
Please tell me how to write code in sql.
If in a given set (Table 1), provided that "clusterid" are the same and "is not null", and also provided that "issuedate" and &...
0
votes
0
answers
166
views
Compare postgresql execution plan
I'm trying to determine the best size for partitioning my biggest tables on Postgresql 12.
So far, I've tried 3 scenarios and executed an explain analyze on my slowest queries that are impacted by ...
2
votes
1
answer
4k
views
Insert into partition table postgresql
everyone!
I'm trying to insert data from non-partition table t1 to a partition one t2 with
insert into t2 (select * from t1);
But I get an error: Partition key of the falling row contains (...
1
vote
2
answers
685
views
Postgres Inheritance based partition scanning all the partitions
I wanted to implement partitioning via inheritance in Postgres.
I implemented the below steps by referring to the Postgres article :-
Created a master table called "test_table"
CREATE ...
0
votes
1
answer
414
views
Error inserting data into Hive partitioned table
I'm trying to insert data into a Hive table with partition, the partition condition is yesterday's date in yyyyMMdd format, and I want to do that dynamically so I'm generating it using a query. The ...
0
votes
1
answer
342
views
What difference does it make to have or not to have the partition on a NONCLUSTERED index creation in SQL Server?
I have a table that is partitioned by a column, let's call it column "Col1"
This column can have the following values: 1, 2, or 3.
All of our queries looking at this table need to have WHERE ...
1
vote
0
answers
2k
views
Out of shared memory errors when doing a select query
Using: Postgres 10.2
Ignoring some unrelated columns, I have the table animals with these columns (omitting some unrelated columns):
animalid PK number
location (text)
type (text)
name (text)
data (...
1
vote
2
answers
830
views
postgres partition duplicated data
I have a transactions table:
CREATE TABLE transactions
(
id BIGSERIAL NOT NULL,
amount BIGINT,
value VARCHAR(200) NOT NULL,
...
0
votes
1
answer
1k
views
Postgres partition by range from x and above condition
I am wondering how to partition a table like,
from 0 to 100
from 100 to 200
200 and above
CREATE TABLE grade_main
(
id serial not null,
g int not null
) partition by range (g);
CREATE ...
0
votes
0
answers
275
views
insert performance degraded after dropping and re creating columnstore index on a partitioned table
The table was partitioned but the range was set to 20, lately the range was exhausted so we increased the range from 20 to 5000. The table had clustered column store index on it so we had to follow ...
1
vote
1
answer
8k
views
Postgresql Partition by column without a primary key
I'd like to be able to partition a table by worksite_uuid. But worksite_uuid needs to be nullable and I need uuid to be a primary key.
The only way I've been able create the partition is if ...
0
votes
1
answer
153
views
datatype change in partitioned tables
We are using MySQL 5.7.17
We have two big tables in production of almost the same size, one is a partitioned table and another is not partitioned. We are trying to change the datatype of a field from ...
6
votes
1
answer
1k
views
Initial extent size when converting to partitioned table
Working in an Oracle 19c database on Linux x86/64 trying to convert non-partitioned table to partitioned table.
Since Oracle12, alter table modify partition has been available to convert non-...
1
vote
0
answers
532
views
Postgres partitioning for large database suggestions
I am rebuilding a system and migrating all of the data from mysql to postgres (along with redis just as cache layer).
The structure is as follows :
users table with under 5000 rows
items table with a ...
2
votes
0
answers
830
views
Auto partition the existing tables that we used to manually add the partitions by splitting the max partition in Oracle
I need suggestions on adding partitions on to the existing manually partitioned tables.
My case:
version : Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Existing table data ...
12
votes
2
answers
5k
views
Indexing the partition key in Azure Cosmos DB
Suppose I've the following data in my container:
{
"id": "1DBF704E-1623-4844-DC86-EFA729A5C048",
"firstName": "Wylie",
"lastName": "...
0
votes
1
answer
1k
views
How to determine whether there are any records in a given Partition Range
Given a SQL Server Partition Function, with multiple ranges, used by multiple tables/indexes, I want to identify which ranges (and whether the 2nd range, in particular) do or don't contain data ...
0
votes
0
answers
104
views
MySQL partition by column value like
I'm trying to partition my tables and so far PARTITION BY LIST COLUMNS (column name) ... works. I was wondering if we can partition or sub partition by column value like % statement. So I have a table ...
0
votes
1
answer
1k
views
create partitions by a non-owner user
I am the owner of a partitioned table (table_name) and I have granted the privileges to another user (user2).
GRANT All ON table_name TO user2
But whenn user2 want to create a partition of table_name :...
0
votes
1
answer
2k
views
PostgreSQL - Creating index on multiple partitioned tables
I am trying to create indexes on multiple (1000) partitioned tables. As I'm using Postgres 10.2, I would have to do this for each of the partition separately, having to execute 1000 queries for the ...