Tag Info

Hot answers tagged

16

It depends on your generation function and size of the final tables GUIDs are intended to be globally unique identifiers. As discussed in the Postgres 8.3 documentation there are no methodologies that are universally appropriate to generate these identifiers, but postgreSQL does ship with a few more useful candidates. From the scope of your problem, and ...


12

One more advice - never use GUIDs as part of clustered index. GUIDs are not sequential, thus if they are part of clustered index, every time you insert new record, database would need to rearrange all its memory pages to find the right place for insertion, in case with int(bigint) auto-increment, it would be just last page. Now if we look to some db ...


6

There's no exact equivalent to what you want. Options include: Atomic file-system snapshot If you're using an atomic file system snapshot you don't need to freeze the database. It might make recovery a little faster if you force a CHECKPOINT first, but that's about it. When you take a filesystem snapshot and copy it, then start the copy, to PostgreSQL it's ...


5

DbVisualiser could fulfill your requirements as it supports quite a number of RDBMS, including JavaDB/Derby. You can see it in action below: The only question mark is if the free version has some limitations which are a stopper for you. You can check the matrix here.


3

It depends. Seriously, with all you've given so far, this is about as far as you can go. Why would it be helpful to use UUIDs? Why won't you use INTs? Why can't you just index on UUIDs later? Do you understand what it means to have a sorted list with the key of a UUID and insert a random (non-sequential) UUID after a few million rows? What platform will ...


2

--EDIT-- My original answer (below) is probably not useful to you at all because it does not address the question of unique constraints. As others have said, these constraints are usually implemented with an implied unique index. In special cases this might not be true (eg disable novalidate for Oracle). The question could be: Is it possible to enforce ...


2

When you are building complex queries, you should build them in stages checking the results as you go, not build one whole huge query and then try to figure out what is wrong. Here is what I do. First I list all the columns I want on a spearate line and comment out all the columns except those in the first table. Then I add the from clause and any where ...


1

Apache DdlUtils can help with some of the migration: http://db.apache.org/ddlutils/ You might also have a skim of the tools listed here: http://wiki.apache.org/db-derby/UsesOfDerby to see if any of those have features that help with migration Derby also has some built-in tools for bulk-importing of data: ...


1

DISCLAIMER : Not a Derby Expert DERBY There are options you can set to increase data pages for Derby For a mass load of table prodtable, you may want to consider create temptable just like prodtable, but with no indexes load data into the temptable rebuild indexes on temptable rename prodtable to zaptable rename temptable to prodtable drop zaptable ...


1

PRIMARY KEY >= UNIQUE >= INDEX == KEY InnoDB data is ordered by the PK. MyISAM PK acts the same as UNIQUE. INSERT must add a "row" to each and every index (of any kind) that you have. This takes some time. (Usually not enough time to matter.) Indexes are all stored in BTree format. MyISAM BTree blocks are 1KB; InnoDB uses 16KB. Inserting into InnoDB ...


1

To answer to question in bold: Yes, making a field unique does index it like s primary key. In fact, I had discussed this in another question with regard to Primary Keys Having Its Own Name to distinguish it from other Unique (Candidate) Keys. As for constraints, indexes are created for you so that constraint paradigm is setup. You should be able to remove ...



Only top voted, non community-wiki answers of a minimum length are eligible