The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Databases
> Firebird SQL Development
|
Table size?
Discuss Table size? in the Firebird SQL Development forum on Dev Shed. Table size? Firebird SQL Development forum discussing administration, Firebird SQL syntax, or other Firebird SQL-related topics. Firebird is the evolution of Borland's Interbase product.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

December 12th, 2003, 03:15 PM
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 10
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Table size?
I have a table with a lot of Varchar fields.
Like: VARCHAR (10000)
But it seems that I am running out of space on this table.
When a try to add a new varchar field (10000), I get this error:
"fmCompile.trCompile:
This operation is not defined for system tables.
Unsucceddfull metadata update.
New record size of 69412 bytes is too long.
TABLE MYTABLE"
Any help?
|

December 13th, 2003, 04:41 PM
|
|
Junior Member
|
|
Join Date: Dec 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Table Size
There is a row width limit of 64k BYTES. ie Unicode chars will be half, etc.
Easy fix, just use BLOBS - each field uses 10 bytes ( it points to the real data)
see this:
URL
cheers - dave
|

December 14th, 2003, 01:15 PM
|
|
Contributing User
|
|
Join Date: Dec 2003
Posts: 249
  
Time spent in forums: 8 h 23 m 12 sec
Reputation Power: 13
|
|
You can use BLOBs for larger text columns, however, they cannot be indexed, easily searched and should be updated/inserted in different ways.
A more important and logical question would be:
Why on earth do you need VARCHAR(10000) columns? 
__________________
Martijn Tonies
Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle
Upscene Productions
http://www.upscene.com
|

December 14th, 2003, 03:48 PM
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 10
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Hi upscene & wagga:
Thanks for your reply.
I need the big varchar fields to store some graphics settings in.
I don't generete the settings, I just need to store them.
I will try the Blob field later.
Thanks for now.
|

December 15th, 2003, 02:52 AM
|
|
Contributing User
|
|
Join Date: Dec 2003
Posts: 249
  
Time spent in forums: 8 h 23 m 12 sec
Reputation Power: 13
|
|
|
In that case, you really should use BLOBs. But are these settings this large?
Well, good luck.
|

December 15th, 2003, 03:40 AM
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 10
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Hi upscene:
Are there a special way to handle BLOB fields when update/insert?
This:
UPDATE myTABLE SET settings = "TEST"
dont work.
Error:
Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.
feature is not supported.
BLOB and array data types are not supported for move operation
|

December 15th, 2003, 03:51 AM
|
|
Contributing User
|
|
Join Date: Dec 2003
Posts: 249
  
Time spent in forums: 8 h 23 m 12 sec
Reputation Power: 13
|
|
Quote: | Are there a special way to handle BLOB fields when update/insert? |
First of all, don't use double quotes ("value") but single quotes for values ('value'). With double quotes, Firebird thinks you're using a column name.
Second, BLOBs can be updated/inserted directly if you're using text blobs (BLOB SUB_TYPE TEXT), but others require you to use prepared statements:
INSERT INTO ... (MYBLOB) VALUES (:MYBLOB)
Prepare the statement.
(In Delphi)
Use something like:
ParamByName('MYBLOB').LoadFromStream(etc)
|

December 15th, 2003, 11:00 AM
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 10
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Hi upscene:
Again thanks.
I use Database workbench as database editor.
Really great product.
I am quit new to Firebird, and I want to optimize my speed/mem usage on my database.
Maybe you can help me explain some of these terms:
- Page size
- Allocated pages
- Page buffers
- Sweep interval
Thanks
Regards
Thomas
|

December 15th, 2003, 11:09 AM
|
|
Contributing User
|
|
Join Date: Dec 2003
Posts: 249
  
Time spent in forums: 8 h 23 m 12 sec
Reputation Power: 13
|
|
Hi Thomas,
>>I use Database workbench as database editor.
>>Really great product.
Thank you for your kind comments.
I advise you to download the InterBase 6 documentation (from www.ibphoenix.com) - most of it is still valid for Firebird.
Short explanations:
>> Page size
Each database is build from "pages". Blocks of database-data with a certain size. Depending on your average record length, one page might be better than another. Most people use 8192 bytes as their page size.
>> Allocated pages
The number of pages used for your database.
>> Page buffers
The number of pages Firebird will allocate as cache memory when someone connects to this database.
>> Sweep interval
Check this elsewhere, I'm unable to explain this quickly.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|