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
1 answer

Whenever I try to sort an array using a pivot one of the values gets replaced by a large negative number

This is the header file, the sort functions are at the end. #ifndef H_arrayListType #define H_arrayListType #include #include using namespace std; template class arrayListType { public: const…
user2924136
  • 47
  • 1
  • 7
0
votes
3 answers

Create equal partitions of a database in R

How can I use R to partition a dataset into N equally sized partitions? I've tried something like for (i in 1:100){data[i] <- full_data[i:(100000*i),]} Which obviously doesn't work, but hopefully gives an idea of what I'm trying to accomplish.…
Geoffrey
  • 196
  • 1
  • 12
0
votes
0 answers

SQL (MS) - Custom compare for Null=Value on many columns

I have a table with 50 columns of identifying information that is inconsistently filled out, even for the same individual. Sadly, individuals do not have a unique identifier in this system. For example, some times we may capture a person's middle…
user3513243
  • 61
  • 1
  • 4
0
votes
1 answer

Split a list using another list that contains lenghts in Python

NOTE: As suggested by some people, I reposted this question to the codereview site I want to split a list using another list which contains the lengths of each split. Eg. >>> print list(split_by_lengths(list('abcdefg'), [2,1])) ... [['a', 'b'],…
VGonPa
  • 443
  • 1
  • 7
  • 12
0
votes
1 answer

Calculate set partitions with specific subset sizes in Scala

I would like to determine all partitions of a given list of integers {1,...,n}, where the elements of the partitions possess a specific cardinality k in {1,Nmin,...,Nmax}. For example: given a list of integers {1,2,3,4} all partitions should be…
user1537137
  • 121
  • 5
0
votes
1 answer

mysql partition by bigint and a primary key(id)

im testing now for +10hours to get a database structure with a primary key (id) and a partition by bigint. but nothing will work :/ is that possible? maybe anybody could give a me good hint ;) CREATE TABLE IF NOT EXISTS `test` ( `id` int(11) NOT…
kewl
  • 56
  • 10
0
votes
1 answer

How to get top row from each partition in Azure Storage Table

I have an Azure storage table in which each partition stores some information about my custom data class. Each partition row is more like a history of that class and only the latest record is supported to get returned when queried. When I know which…
hamid
  • 11
  • 3
0
votes
0 answers

Quicksort code with choice of pivot

I am trying to write a quick sort for Strings. I wrote the code and it works when I run the program. I am able to successfully sort the array. When applying quick sort, you separate the array from 0 - (x - 1) and (x + 1) - y, where x is the pivot…
user3339453
  • 57
  • 1
  • 7
0
votes
1 answer

How to run Java off of a FAT32 partition with Linux as the OS?

I have the same situation as described here in this SO post. Looks like, no solution was found. I am additionally open to using OpenJDK if its build process / makefile can somehow be altered to yield a monolithic, statically-linked java binary,…
Harry
  • 3,684
  • 6
  • 39
  • 48
0
votes
1 answer

Partitioning a set into exactly k blocks

I have a need for an algorithm to generate all partitions of a set S into exactly k < |S| blocks. Note: I have already found the algorithm for generating all possible partitions; I just need the k - partition algorithm. Any idea?
coderodde
  • 1,269
  • 4
  • 17
  • 34
0
votes
1 answer

T-SQL partition by for string columns

I try to generate a new column by grouping other columns and the code below works. CASE WHEN familyGroupPOSRef = 955 THEN MAX(RVCPOSId) OVER (PARTITION BY organizationID, Location_Code, transactionID) ELSE -1 END AS…
Ozland
  • 89
  • 2
  • 13
0
votes
1 answer

What should be the strategy to read from many tables having millions rows each in postgresql?

I have following scenario while using postgresql - No of tables - 100 , No of rows per table - ~ 10 Million . All the tables have same schema E.g. each table contains daily call records of a company. So 100 tables contain call records of 100 days. I…
0
votes
0 answers

SQL Server partitioned view key

I have a partitioned view with 20 tables. Each table has a partition key (usp_id) ranging from 1 to 20. If I query the partitioned view using the partition key then only the table with the correct usp_id is queried which is fine. Now i have a second…
0
votes
0 answers

Need to recalculate partition layout after filter in D3?

I am using the Zoomable Icicle layout example to view a folder hierarchy. I currently use the filter function as follows: var data = partition.nodes(root).filter( function (d) { return d.parent == null ? d.children &&…
sim1
  • 457
  • 1
  • 7
  • 26
0
votes
1 answer

Euler's pentagonal number function in python

max = 200 max=max+2 ### due to the later code, it got offset by 2 P = [0]*max ### make a list of zeros, length max P[0] = 1 P[1] = 1 print 0,":", P[0] ### print value for n = 0,1 print 1,":", P[1] Psign = [0]*max ### make a list the same length…