2012年2月5日日曜日

What Is Modulus 10

what is modulus 10

Time to move table to new tablespace — Postgresql General Discussion

Re: Time to move table to new tablespace — Postgresql General Discussion

Craig,

Good suggestion - I have experimented with table partitioning in the past, but the impact on performance was considerable. 

In our case, we have one large table with real estate statistics arranged in time (weekly for the last five years) and geography (every zip in the US). You could imagine a date-range partition strategy (each year is a separate partition, for example) or a spatial (10 partitioned tables based on the modulus 10 of ZIP code, perhaps) approach.

However, our query patterns span both data dimensions:


Kryptonite Modulus 1010S 2 Cable Pack (10mm X 3.5-Feet)
Learn more

"Select median price for every zip code as of 2012-01-06" (customer exports)

"Select median price for 94086 from 2005-01-01 through 2012-01-06" (charting apps)

So by partitioning in one dimension we impact queries in the other.

If you have a brilliant solution to problems like this, we'd be happy to hire you (not a joke).

Cheers,

Jason


Modulus Guitars Vertex 4 Electric Bass Grey
Learn more

On Sun, Jan 8, 2012 at 5:12 PM, Craig Ringer wrote:
On 7/01/2012 10:52 PM, Jason Buberel wrote:
I'm considering the migration of an existing large (2.3TB) table to a new tablespace. The table size, according to the '\dt+' command:
 public | city_summary | table | altosresearch | 2345 GB    | 

Are there any considerations - besides the usual disk and network IO constraints - that I need to take into account when estimating the amount of time that would be required for the following commands to complete?

psql> create tablespace 'newstorage' location '/some/new/path';


psql> alter table city_summary set tablespace = 'newstorage';

Any other recommendations are welcome, such as "You are an idiot for not using partitioning in the first place" :)


Maybe you should create a set of partitioned tables in the new tablespace, copy your data over, then drop the old table and rename the partition to the old table's name instead? If the big table keeps on accumulating data (via INSERTs) you can add a trigger that mirrors all updates to the partition while the copy runs.

This won't work so well if the big table has UPDATEs and DELETEs too, since you can't delete or update records from a trigger before they've been copied to the new table and committed.

--
Craig Ringer

--
Jason L. Buberel
CTO, Altos Research

650.603.0907




[Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Programming PHP]     [Kernel Newbies]     [PHP Classes]     [Find Someone Nice]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]



These are our most popular posts: what is modulus 10

ShowerSeal Ultra 10 Kit – Seals in your shower tray without leaks ...

Supplied as a complete kit with high modulus "mould-free for 10 years" anti-fungal sealant, bath wipes and full fitting instructions. By having a "solid profile" rather than the traditional "hollow" bath trims, the adhesion between ... read more

What is a Remainder in Math, and Why Do We Care?

Lets try a more challenging one: what is 187 mod 12? 12 goes into 18 once, with six left over; it then goes into 67 five times, with 7 left over, so we get 187/12 = 15r7, and the remainder is seven. Finally, what is 120 mod 10? read more

CREDIT CARD GENERATOR CHANGED MY LIFE !!!!!! Valid Visa ...

Updated currently supports the Luhn algorithm or Luhn formula standard, also known as the "modulus 10″ or "mod 10″ algorithm. Please dont abuse. Program is for educational purposes only. credit card GENERATOR ... read more

Developing PHP Credit Card Validation Applications « Web ...

The fundamental root of validating credit card numbers is the Modulus-10 validation method. This is a simple set of ... The test value passes to Modulus-10, also called Mod-10, for final card number validation. Mod-10 is ... read more

Related Posts



0 コメント:

コメントを投稿