Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1087371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:55:50+00:00 2026-05-16T22:55:50+00:00

I have a production database, using Firebird 2.1, where I need to find out

  • 0

I have a production database, using Firebird 2.1, where I need to find out how much space is used by each table, including the blobs. The blob-part is the tricky one, because it is not covered using the standard statistical report.

I do not have easy access to the server’s desktop, so installing UDFs etc. is not a good solution.

How can I do this easily?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:55:51+00:00Added an answer on May 16, 2026 at 10:55 pm

    You can count total size of all BLOB fields in a database with following statement:

    EXECUTE BLOCK RETURNS (BLOB_SIZE BIGINT)
    AS
      DECLARE VARIABLE RN CHAR(31) CHARACTER SET UNICODE_FSS;
      DECLARE VARIABLE FN CHAR(31) CHARACTER SET UNICODE_FSS;
      DECLARE VARIABLE S BIGINT;
    BEGIN
      BLOB_SIZE = 0;
      FOR
        SELECT r.rdb$relation_name, r.rdb$field_name 
          FROM rdb$relation_fields r JOIN rdb$fields f 
            ON r.rdb$field_source = f.rdb$field_name
        WHERE f.rdb$field_type = 261
        INTO :RN, :FN
      DO BEGIN
        EXECUTE STATEMENT
          'SELECT SUM(OCTET_LENGTH(' || :FN || ')) FROM ' || :RN ||
          ' WHERE NOT ' || :FN || ' IS NULL'
        INTO :S;
        BLOB_SIZE = :BLOB_SIZE + COALESCE(:S, 0);
      END
      SUSPEND;
    END
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a production web and database server with SQL Server 2000. (However, a
I have test database and a production database. When developing I of course work
I have a project here that connects to an in-production database and grabs tables
We have a production SQL Server 2005 database server with the production version of
We're being asked to spec out production database hardware for an ASP.NET web application
We occasionally want to copy our production database with data and have it populate
We have a production machine and are trying to slowly introduce some 3.0 and
I have a production server running with the following flag: - XX:+HeapDumpOnOutOfMemoryError Last night
We have SOAP web services in production that are relying on SOAP Headers (containing
I have pushed my .htaccess files to the production severs, but they don't work.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.