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
0
votes
0 answers

Query time after partition in postgres

I have table location in postgres database with more then 50.000.000+ rows, and i decide to do partition! Table parent have columns id,place and i want to do partition onplace column, with php and mysql i get all distinct places(about 300) and…
squareCircle
  • 192
  • 1
  • 13
0
votes
1 answer

Spark SQL partition pruning for a cached table

Is partition pruning enabled for cached TempTables in apache spark? If so, how do I configure it? My data is a bunch of sensor readings in different installations, one row contains installationName, tag, timestamp and value. I have written the data…
0
votes
0 answers

SQL Rank () OVER Partition with mutliple where

I've got the database from which I would like to extract some sales data divided into clients and months. I've tried using Rank () over (partition by ...) but doesn't work. SELECT * FROM (SELECT access_Month, client, Sum(sales) as sales, RANK…
0
votes
1 answer

Split a list partition (set of values) into multiple single value partitions in Oracle

I have a table which is partitioned by list and each partition have multiple values. For example: partition by list (COL1) ( partition GROUP_1 values ('VAL1','VAL2','VAL3') ) This table has huge data and sometimes, multiple sessions are trying to…
user1140840
  • 79
  • 10
0
votes
1 answer

How can I parallel execute sql for MySQL partition table each partition

There is a partition table A, has 4 partitions, I want to load data to Table B. insert into B select * from A partion (p0) where type = 0; insert into B select * from A partion (p1) where type = 0; insert into B select * from A partion (p2) where…
elevenights
  • 128
  • 1
  • 10
0
votes
0 answers

When does HIVE (not) use WHERE clause on partition as predicate filter

I have two tables, tbl_a and tbl_b, both formatted as ORC, and partitioned on the column dt. One table uses a partition format %Y%m%d%H%M whereas the other table uses %Y%m%d. When I look at the execution plan of a simple SELECT + WHERE statement in…
0
votes
2 answers

Why Google BigQuery doesn't use partition date correctly when using views

I have a date partitioned table (call it sample_table) with 2 columns, one to save dateTime in UTC and other to save timezone offset. I have a view on top of this table (call it sample_view). The view takes _partitiontime in from table and exposes…
opensourcegeek
  • 5,552
  • 7
  • 43
  • 64
0
votes
2 answers

r: how to partition a list or vector into pairs at an offset of 1

sorry for the elementary question but I need to partition a list of numbers at an offset of 1. e.g., i have a list like: c(194187, 193668, 192892, 192802 ..) and need a list of lists like: c(c(194187, 193668), c(193668, 192892), c(192892,…
nelson
  • 1
0
votes
2 answers

Detect bitlocker partition state using delphi

I enqrypted one of my partitios with bitlocker before and it works perfect. For now how can i detect if this partition is open or not? I mean the partition is locked or not?
M.MARAMI
  • 95
  • 9
0
votes
1 answer

Set the right partitions for Crate Database

I am modelling for the Database CrateDB. I have an avg. of 400 customers and the produce different amounts of time-series data every day. (Between 5K and 500K; avg. ~15K) Later I should be able to query per customer_year_month and per…
duichwer
  • 157
  • 1
  • 14
0
votes
1 answer

How to use repartitionAndSortWithinPartitions in Java

Can anyone give a clear example on how to use repartitionAndSortWithinPartitions in Java, not scala. Thanks in advance!! Ani
Ani
  • 598
  • 5
  • 13
  • 29
0
votes
1 answer

Is my distributed database C+A or A+P?

Let a distributed database have a recover mechanism such as, in case it is splitted by a network partition which allows two sides to keep working, both sides continue to commit transactions and, when the partition is ending, they agree to go back to…
Samuel
  • 594
  • 1
  • 6
  • 22
0
votes
1 answer

Using partition by to get count in Oracle

I have a EMP table. I need to get number of employees in each department grouped by country name = 'INDIA','USA', 'AUSTRALIA'. For example, DEPARTMENT | #EMPLOYEE(INDIA) | #EMPLOYEE(USA) | # EMPLOYEE(AUSTRALIA) ACCOUNTING | 5 …
Roshni
  • 189
  • 1
  • 18
0
votes
0 answers

Is there a preferred or built-in way to partition arrays?

Given an array and the number of almost equally sized parts that you want it divided into, is there a preferred way of doing so or a built-in that will handle the task? Two example implementations are given below, but someone may know a better…
Noctis Skytower
  • 21,433
  • 16
  • 79
  • 117
0
votes
1 answer

Recursive QuickSort in java not working

I am trying to implement a quicksort in java which has the last element of the array as a pivot. However, it does not seem to be working even though on paper it should.. This is the output: before sort: 5 2 3 1 4 after sort: 3 2 4 5 1 The…
Linxy
  • 2,525
  • 3
  • 22
  • 37