Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Rajiv Gupta Newsgroups: comp.lang.java.programmer Subject: Re: Java DB rotation Date: Wed, 8 Feb 2012 02:08:06 +1100 Organization: Aioe.org NNTP Server Lines: 22 Message-ID: References: NNTP-Posting-Host: OYWe3ONXJ9N+SxS4Zjol1A.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Unison/2.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11817 On 2012-01-31 13:08:04 +1100, Jim Lee said: > I have a Java server controller that read/write to Database table > > Java server will start read / write to a new DB table every > week/monday > e.g. > table-1-2-2012 > table-1-9-2012 > table-1-16-2012 > table-1-23-2012 ... etc > > I think of 2 ways to do the DB table rotation > > 1) check the server timestamp, if today's date is week of 1-23-2012, > then read/write to table-1-23- > > 2012 Sir, that sounds really really fucked up. Why not just one table? Tables can store huge amounts of data efficiently.