I once worked in a place that put .001 .002 on all the primary keys to signify which cluster they were managed from.
When I complained it was "utter tulip" the tech lead claimed they get performance improvements on the queries.
Some amount of complete roasters in this industry
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Reply to: Is this possible / advisable with MySQL
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Is this possible / advisable with MySQL"
Collapse
-
Maybe the reason is for security, not risking customer A accessing customer B data by having the security aspects completely partitioned.
Many times a flaw in application security has allowed data to be revealed with expensive legal repercussions...
Leave a comment:
-
I would prob set up triggers on the source databases to update the merged one in real time
If the PKs are unique I would just extract to flat file and search and replace the tables names, obvs dependant on DB size.
Leave a comment:
-
stored procedure to update each table or to join all the tables together?
Leave a comment:
-
In that case then as long as the tables are all named differenly then there is nothing to stop you from putting them all in the same database.Originally posted by SimonMac View PostYep it's to try and get round a licence problem, easier/cheaper to interrogate one database than multiples
MySQL doesn't support database schemas in the same way that other databases do (where you would have multiple schemas in the same database and keep the tables separately), so you have to have them all in the same database, but as long as the names don't clash then you'll be OK.
You should be able to do a table extract to flat file and then create the table in the common instance fairly easily.
Leave a comment:
-
Yep it's to try and get round a licence problem, easier/cheaper to interrogate one database than multiplesOriginally posted by TonyF View PostYes it's possible.
If you aren't limited in the nuymber of databases you can have, then I wouldn't bother bringing different applications into the same database - beyond only having one set of credentials, what benefit does it bring? And I'm not saying that having one set of credentials is a benefit.
Even if the applications are different (different versions or completely different applications), you can have them in the same database as long as you have space etc for the data. I'm not sure what the benefit would be though, unless you are being charged per database instance.
Leave a comment:
-
Yes it's possible.
If you aren't limited in the nuymber of databases you can have, then I wouldn't bother bringing different applications into the same database - beyond only having one set of credentials, what benefit does it bring? And I'm not saying that having one set of credentials is a benefit.
Even if the applications are different (different versions or completely different applications), you can have them in the same database as long as you have space etc for the data. I'm not sure what the benefit would be though, unless you are being charged per database instance.
Leave a comment:
-
Is this possible / advisable with MySQL
I have several copies of the same application, each with a MySQL database, each identical except for some random characters before each table name as below:
What I would like is to take say table 2 of each database an import them into database X so we haveCode:db1 xxx_table1 xxxx_table2 xxxx_table3 xxxx_table4 db2 yyyy_table1 yyyy_table2 yyyy_table3 yyyy_table4 etc
I can then point an application at this one database, rather than each of the individual databases, I can also change/add/remove the source databases buy just changing a script to point to the new/change/removed location.Code:dbx xxxx_table2 yyyy_table2 zzzz_table2
As the version of the app will always be consistent across the environments I am hoping that there will be no issues with schema etc.
Firstly is this possible? Secondly if so what is the best way to do it, I assume a cron job or something on the target server, can this be run to limit the entries pulled back from the tables for a given period IE update the target database with new entries from the last hour.Tags: None
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Is your Director’s Loan Account (DLS) a target of HMRC’s closer look at close companies? Yesterday 04:45
- Contractors, are you making any of the five big limited company bank account mistakes of 2026? May 28 05:51
- ‘Welcome’ increase in HMRC mileage rates for contractors using their own cars for work May 27 05:18
- King’s Speech 2026 including a welcome Late Payments Bill still leaves contractors short May 26 04:42
- Getting a mortgage when you're a contractor. The system wasn't built for you. Is that finally changing? May 22 06:11
- How deepfake AI contractors threaten umbrella company supply chains under JSL May 20 06:31
- Mileage rates review: Will the first AMAP rethink in 15 years benefit contractors? May 19 05:57
- What is a Forward Deployed Engineer (FDE), and are FDE jobs for IT contractors ripe? May 18 04:43
- IT contractor demand lunged towards growth in April 2026 May 13 04:48
- What does PGMOL’s win over HMRC mean for contractors? May 12 07:25

Leave a comment: