问题
I have a project that requires me to create tables on the fly. When tables are created it needs to support at least 1000 columns in each table. All INTs, Dates, BITs, will be indexes. So there could be about 400 indexes on one table. Once data is uploaded to the server no other inserts or updated will be performed on the table. I will use a library like lucene to index text.
My questions are:
- Can CUBRID handle 1000's of tables in one database?
- What is the performance of CUBRID when selecting on a table with a thousand columns and hundreds of indexes?
- Does CUBRID have a windows GUI interface to run ad hoc queries and manage tables
- Can DDL and DML statements be in the same transaction?
I am well aware of database normalization design issues here. I have fully researched normalization issues and arrived that creating many tables and columns is the best solution.
回答1:
Disclaimer: I am a part of the CUBRID team.
Short answer:
- Yes.
- Depends.
- Yes.
- Yes.
Long answer:
As mentioned at CUBRID RDBMS Size Limits, you can create unlimited number of tables with unlimited number of indexes per table as long as you have enough disk space.
However, the number of columns per table is limited to 6400 which should be enough for you, I guess.It depends on the number of records you are going to have. It wouldn't matter too much if you didn't have so many columns in one row. The number of records will affect not only the data volume size (the file on the disk where the data is stored), but also the index volume size, where index keys and values are stored. With your current schema design where you have thousands of columns your index volume size, I suspect, will be significantly larger than your data volume size because every index will store copies of all values of the column you index.
Creating a proper set of indexes will allow you to improve the performance.- Check out Index Optimization in CUBRID to learn more about how you can optimize your queries.
- To further optimize your query, leverage Index Hints.
But you should seriously consider normalizing your data.Also, your hardware configuration will significantly affect the performance of the server. For your case, large RAM and CPU is highly recommended.
Any other RDBMS will face similar issues when working with such schema. CUBRID, in general, provides high SELECT performance with well defined indexes. So you should focus on this.
There are three GUI tools you can use to administer your database.
- CUBRID Manager: an all-in-one, powerful database administration tool for CUBRID
- CUBRID Web Manager: a Web-based alternative for CUBRID Manager.
- CUBRID Query Browser: a light version of CUBRID Manager without host management and monitoring features.
CUBRID complies with SQL92 standard. So you can define a table and insert records within the same transaction.
来源:https://stackoverflow.com/questions/14949378/what-is-the-performance-of-cubrid-with-a-1000-columns-with-indexes