Subject | Re: What structure would fit better? |
---|---|
Author | ehaerim |
Post date | 2011-12-18T20:14:30Z |
I found a typo.
ex) (s_1004, b1004_20110728)
should be
ex) (s1004_20110728, b1004_20110728)
[PS] I don't see how to edit this post, and wrote this Reply.
Anyone knowing how to edit a post, let me know.
ex) (s_1004, b1004_20110728)
should be
ex) (s1004_20110728, b1004_20110728)
[PS] I don't see how to edit this post, and wrote this Reply.
Anyone knowing how to edit a post, let me know.
--- In firebird-support@yahoogroups.com, "ehaerim" <ehaerim@...> wrote:
>
> I have 3000 symbols and each symbol will have a blob data everyday.
> In one year, there will be 3000*365 blob records.
> And I will insert these records per yearly database. ex)db_2011.fdb
>
> I am thinking of creating a table having (symbol_date, blob) structure.
> So, the records will look like
> (s0001_20110101, b0001_20110101)
> ...
> (s0001_20111231, b0001_20111231)
> ....
> ....
> (s3000_20110101, b0001_20110101)
> ...
> (s3000_20111231, b0001_20111231)
>
> And my main most frequent query will be to find a record corresponding to a symbol and a specific date. ex) (s_1004, b1004_20110728)
>
> Also main everyday insert will be to insert today's new record for each symbol. That is 3000 inserts once everyday.
> And everyday I will have to find the record having the most recent date.
>
> Two possible structures.
>
> [1] (Symbol, Date, Blob) => Symbol primary and Date is secondary key
> [2] (Symbol_Date, Blob) => Symbol_Date is single primary key
>
> At the moment I was experimenting with [2] simply because of easiness.
>
> What structure would fit better in terms of performance and ease of use? And why?
>
> thx
>