Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to Index EXTERNAL TABLES [CORE2480] #2893

Open
firebird-automations opened this issue May 29, 2009 · 6 comments
Open

Add ability to Index EXTERNAL TABLES [CORE2480] #2893

firebird-automations opened this issue May 29, 2009 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: K. A. (parshua)

We use EXTERNAL TABLES like external databases, meaning we use them when we have some data that we do not want to go into the database (due to many reasons), but we still want to be able to select and join from that table. In many cases, the EXTERNAL TABLE itself is much bigger than the whole database, and is read-only, and is rarely replaced by another updated file.

To let you have an idea of the scheme, let us assume that we have a database that records some transactions about some customers, but the Customer table is populated elsewhere. The Customer data is huge, but rarely updated, and the database itself is smaller, but regularly needs to be sent to many sub departments. this was not an actual case, but I hope it gives you the idea. Due to security/infrastructural reasons, online or live replication is not possible, so the database have to be ported by physical storage medium (CD/DVD)

The only thing that makes this difficult is that when the data in EXTERNAL TABLE grows and the record count passes some few tens of million records, statements that query the ET become very very slow, particularly on left joins.

Being able to index ETs would help us overcome this problem, and it will make ETs work like full fledged database tables.
If the index file could be kept beside the external file would be great, as it can be ported with the ET file and does not need to be indexed again in the destination.

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

If indexes are important for your processing of ETs, then the ET data should be loaded into a Temporary or a real FB table and then indexed appropriately.

This case should not be considered for implementation.

@firebird-automations
Copy link
Collaborator Author

Commented by: K. A. (parshua)

I know what I need better, and for Firebird, it is either indexing the ETs, or having the ability to select from other databases; And Firebird implements neither of them.

Whichever is implemented first, I'm a happy guy.

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

I don't think that is going to be added a day.

However, I think that a well designed kind of tablespace would cover your needs.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Version: 3.0 Initial [ 10301 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Adriano is correct. What you need is a tablespace / pagespace mechanism, so that you could specify the huge table to reside in a different physical database file and be able to skip it during backup / file copy operations.

@firebird-automations
Copy link
Collaborator Author

Commented by: K. A. (parshua)

I don't know if that would be an answer, because a Tablespace is a part of a database and so it must take part in its integrity.

In this case, the "dettached" part may not be the same in all locations, and the database must not have any assumptions about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant