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

Better table partition keys? #34

Open
boudinov opened this issue Jun 15, 2017 · 1 comment
Open

Better table partition keys? #34

boudinov opened this issue Jun 15, 2017 · 1 comment

Comments

@boudinov
Copy link

boudinov commented Jun 15, 2017

When using Nlog, one usually has a different logger for each class he uses it in.
By choosing logger name as Partition key, aren't you fragmenting you data in awkward way.

When you query log entries, you always first filter by date/time. So for example you query the logs for the last hour or day, and Azure Table is gathering data from god knows how many physical partitions, because the logger names are scattered.

Should't date be main part of partition/row keys?

@harouny
Copy link
Owner

harouny commented Jun 19, 2017

Hi there, quoting from readme:

"it is possible to prefix the partition keys used with a custom string. [[PartitionKeyPrefix]] and [[PartitionKeyPrefixKey]] are optional and [[PartitionKeyPrefixKey]] has precedence over a hard coded value in [[PartitionKeyPrefix]]. Further, you can use [[PartitionKeyPrefixDateFormat]] to provide a standard DateTime format string to prefix the partition with, which may result in a better partitioning strategy in some use cases."

I hope that helps.

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

No branches or pull requests

2 participants