Dev Shed Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDev Shed Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old February 3rd, 2003, 02:49 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
Pray for Database....

I would like everyone to take a moment to say a small prayer for my database and the application that's about to do conversion on it.... the old database format is a mish-mashed disaster lacking any coherent design mechanism. The coversion program is my own little franken-script written (or, maybe kludged is the appropriate term) in perl, developed over the last three hours; a period of time that has been interspersed with other code troubleshooting and maintenance plus some communication breakdown and maybe even a little bit of mental instability...

Please help a database in need.. a prayer is the only chance it's got!

[back to reality for a moment...]
Ah.. sorry... it's been quite a day
[/leaving reality again]

Reply With Quote
  #2  
Old February 3rd, 2003, 02:56 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
you know, prayers are for the ones that believe. backups are for those that know...
never thought i had to tell this to another senior.
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Reply With Quote
  #3  
Old February 3rd, 2003, 03:33 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
Oh, it's backed up. It's backed up at many many stages. Time is not on my side, however. I don't have time to recover a backup and rebuild the script if there's a failure.

Basically, if it doesn't work this time - I'm toast!

Maybe the prayer should be for the code? Or for me?

Reply With Quote
  #4  
Old February 3rd, 2003, 03:53 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
i pray for:
you having the most CPU power available
you having the fastest harddisk in the world
you having the fastest database you can get
you not being toasted...

but then - im an atheist, what would it help you me praying?

anyway, wish you much luck. (destiny is the only power greater than god´s will...) keep us up-to-date.

Reply With Quote
  #5  
Old February 3rd, 2003, 04:09 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
You MUST be an atheist .. for your prayers I got:
a 733 Mhz Celeron (100Mhz FSB)
a 5200 RPM generic IDE
Access '97
WindowsNT 4.0 SP5
and perl....

Thank god for perl....

The script hung at the end, but before it did it finished 87% of the conversion. The remaining 13% is definitely doable by hand.

Results:
100% accurate conversion. We're talking tables that look worse than this:
Code:
COL1         COL2         COL3          COL4         COL5
--------------------------------------------------------------
blah            foo           dah
                                  bar            huh?         blug
                                  flub            blub         tub
honk           oink          pargh
                                  bish           bosh         flosh
---------------------------------------------------------------

turning into streamlined, unordered data. Result: database size dropped from over 30 Megs to 600Kb (although, the search index isn't complete in the new one which will account for about a 130% growth - still....).

The original database tables were layed out in such a way as to be somewhat "human readable". I added a layer of abstraction to the system and removed the need for human readable tables (read: people don't muck around in the database anymore, they muck around in a GUI).

I live to see my job another day // LOL // Although had it all blown up I really could have delayed the implementation without too much ruckus. Unfortunately, every piece of software, script, and setup that could go wrong in our systems went wrong today... just what I'd need to pile on top of it - the delay of a serious, time-critical upgrade. I would not have looked good.

Phew.. not out of the woods yet, but at least I can finally see something other than trees.

Reply With Quote
  #6  
Old February 3rd, 2003, 04:10 PM
NoXcuz's Avatar
NoXcuz NoXcuz is offline
Wiking
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Sep 2000
Location: Sweden
Posts: 3,608 NoXcuz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 49 m 27 sec
Reputation Power: 11
Hmm, I hardly know how to say a prayer, but I could keep my fingers crossed for you for a while if that'll help...

[revelation]
It's hard to type with your fingers crossed you know...
[/revelation]

//NoXcuz
__________________
UN*X is sexy!
who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep

Reply With Quote
  #7  
Old February 3rd, 2003, 05:08 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
Quote:
It's hard to type with your fingers crossed you know...

I forsee toe-typing as being the next big thing so as to avoid strain on the wrists. Who ever heard of Ankle Tunnel Syndrome anyway?

Correction:

Size of completely converted database will be around 1.5 megs. That's a drop to about 5% of its original size. Also, the script isn't hanging. It just infinite loops at the end because it runs "while(keys exist in hash table)". Unfortunately, because not all of the tables are to be converted, there will forever be keys in hash table, and hence when it finishes with the tables it's SUPPOSED to convert it just keeps looping through the remaining keys. Not good since I have to C-c it to stop it, and there's still a database connection open at that point. I got away with a big one there...

Last edited by Ctb : February 3rd, 2003 at 05:12 PM.

Reply With Quote
  #8  
Old February 3rd, 2003, 05:28 PM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 13
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
Cross fingers for me as well - I'm moving mysql to postgres right now. The structure is somewhat different so I have to join several tables and then pipe results into pgsql with different table and field names. As of right now, mysql is 1.5 gigs
__________________
And you know I mean that.

Reply With Quote
  #9  
Old February 3rd, 2003, 09:39 PM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,829 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 5 m 8 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
Now that's a nice sized database. Sounds almost like my DB2 server.

Now for the prayer...

<hands clasped together holding a $100 bill>Oh great and almight Bill,
hallowed by thy name,
thy os is best,
and none shall rest,
while linux is still out there.
You shall own all,
and have power...
<curses, must reboot />

Reply With Quote
  #10  
Old February 3rd, 2003, 10:13 PM
dcaillouet's Avatar
dcaillouet dcaillouet is offline
Big Endian
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2001
Location: Fly-over country
Posts: 1,173 dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 16 h 29 m 5 sec
Reputation Power: 24
I was trying to help another poster with an Access problem several months back and eventually I suggested he should sacrifice a virgin to the programming gods. Unfortunately I never got any feedback on whether that helped or not. It seems prayer may be the better solution...

Reply With Quote
  #11  
Old February 3rd, 2003, 10:23 PM
roninblade's Avatar
roninblade roninblade is offline
// no comment
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Dec 2001
Posts: 1,639 roninblade User rank is Sergeant Major (2000 - 5000 Reputation Level)roninblade User rank is Sergeant Major (2000 - 5000 Reputation Level)roninblade User rank is Sergeant Major (2000 - 5000 Reputation Level)roninblade User rank is Sergeant Major (2000 - 5000 Reputation Level)roninblade User rank is Sergeant Major (2000 - 5000 Reputation Level)roninblade User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 4 h 45 m
Reputation Power: 33
Quote:
I suggested he should sacrifice a virgin to the programming gods. Unfortunately I never got any feedback on whether that helped or not. It seems prayer may be the better solution...



hmmmm... he may have followed your advice and got his problem solved.

Reply With Quote
  #12  
Old February 3rd, 2003, 10:40 PM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 13
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
/me can thinks of a better thing to do with a virgin

Reply With Quote
  #13  
Old February 3rd, 2003, 10:55 PM
a.koepke's Avatar
a.koepke a.koepke is offline
Second highest poster :p
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Jul 2001
Posts: 7,323 a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 8 h 8 m 45 sec
Reputation Power: 26
What... water sports?

Reply With Quote