Questions tagged [partition]

Use this tag for questions about code that partitions data, memory, virtual machines, databases or disks.

In computing, partition may refer to

  • Disk partitioning, the division of a hard disk drive
  • Partition (database), the division of a database
  • Logical partition (virtual computing platform) (LPAR), a subset of a computer's resources, virtualized as a separate computer
  • Memory partition, a subdivision of a computer's memory, usually for use by a single job
  • Binary space partitioning

source: https://en.wikipedia.org/wiki/Partition

Note that non-programming questions about database partitioning are likely to be better received on Database Administrators and disk partitioning on Server Fault.

1547 questions
5
votes
3 answers

Set partition with constraints in Python

I had a hard time to deal with a group partition issue. Will someone shed some light for me please? Let me simplify my question. I want to divide ten numbers (i.e., 0, 1, ..., 9) into three groups, with (4, 3, 3) numbers each group. The conditions…
Peter Adam
  • 53
  • 1
  • 4
5
votes
2 answers

linux partitions to drive mapping

In linux, I am using the blkid apis to get most information about disk partitions. I am unable to find an API that would let me find out the mapping between a partition name and its drive. For example, the disk /dev/sda is partitioned into…
user3092576
  • 51
  • 1
  • 2
5
votes
2 answers

getting error 1503: A primary key must include all columns in the table's partitioning function

I have a table structure like- CREATE TABLE `cdr` (`id` bigint(20) NOT NULL AUTO_INCREMENT, `dataPacketDownLink` bigint(20) DEFAULT NULL, `dataPacketUpLink` bigint(20) DEFAULT NULL, …
Aamir
  • 738
  • 2
  • 17
  • 41
5
votes
2 answers

Faster way to move file in c++ on linux

I'm trying to move files on linux by using C++. The Problem is, that the source file and the destination folder can be in different partitions. So I can't simply move the files. Ok. I decided to copy the file and delete the old one. //----- bool…
Korbi
  • 714
  • 1
  • 9
  • 18
4
votes
2 answers

How to split a list in two over a condition?

Is there a grep-like function that splits a list into both the part that matches the expression, as grep does, and also its complement? Of course it would be very simple to write such a function, but I'm interested to know if it already exists and…
Anna
  • 2,645
  • 5
  • 25
  • 34
4
votes
1 answer

SQL - Bigquery - Rank on clustered partitions

I have an analytical function challenge on Bigquery that is messing with my mind. Sorry if I am missing any fundamental function here, but I couldn't find it. Anyway I think this can lead to a good discussion. I would like to get a rank among groups…
spcvalente
  • 136
  • 3
  • 14
4
votes
1 answer

libnativehelper missing variant in Android build

I'm trying to compile a JNI in the Android product partition. For that purpose I added the property product_specific: true in the Android.bp such as: cc_library_shared { name : "..." ... shared_libs: [ "libandroidicu", …
Apiche
  • 41
  • 3
4
votes
1 answer

Purpose of Writable but Stateless Partitions under Container OS

Recently I was running a container under Compute Engine's container OS, and my data (my TLS certificate specifically) wasn't getting persisted outside of the container across reboots because I was writing to /etc. After a bit of time, I stumbled…
4
votes
1 answer

is it safe to use git in the same directory but from different OS (dual-boot)?

I am dual-booting Linux and Windows, and have git configured on both of them. When using Linux, is it safe to access the files directly from the Windows partition or should I just clone them from the remote repo for the new OS instead? thank you
4
votes
1 answer

understanding kafka log.dirs

I have Kafka cluster and the log.dirs=/data/kafka is set to the data directory in server.properties. my DATA partition is kept getting full due to these logs which take a big part of it. (talking about binary logs in topic directory like…
NoamiA
  • 521
  • 4
  • 19
4
votes
1 answer

PostgreSQL: get first non null value per group

I'd like to obtain is the first ocurrence of non-null value per category. If there are just null values, the result of this category shall be NULL. For a table like this: Category Value 1 NULL 1 1922 2 23 2 …
belfastcowboy24
  • 147
  • 2
  • 7
4
votes
0 answers

Drop partition by name sql server

I would like to know how to drop partition by name in SQL SERVER like MySQL do it, example : CREATE TABLE t1 ( id INT, year_col INT ) PARTITION BY RANGE (year_col) ( PARTITION p0 VALUES LESS THAN (1991), …
kizawa tomaru
  • 103
  • 1
  • 8
4
votes
2 answers

How to drop multiple interval partitions based on date?

I have a table based on daily partitions. I can drop a paritition using the below query ALTER TABLE MY_TABLE DROP PARTITION FOR(TO_DATE('19-DEC-2017','dd-MON-yyyy')) How can I drop all the partitions (multiple partitions) before 15 days?
TomJava
  • 499
  • 1
  • 8
  • 24
4
votes
2 answers

aws firehose to s3 bucket partitioning name like year=YYYY, month=MM, day=MM, hour=HH

Currently, AWS Firehose has a default partitioning feature to return the data into S3 with this following partitioned format of folders: YYYY/MM/DD/HH => e.g: 2017/10/26/18 But, I would like to make it like…
Daniel
  • 41
  • 4
4
votes
2 answers

how to query a partitioned table in bigquery from datastudio

This topic was covered for tableau here: How to query a partitioned table in BigQuery from Tableau but I don't think you can insert parameters into datastudio yet.
Ralph
  • 65
  • 1
  • 6