You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Kant Kodali <ka...@peernova.com> on 2016/10/26 08:03:14 UTC

which one of the following choices is more efficient?

If one were given a choice of fitting all the data into one table vs
fitting the data into two tables while say (keeping all the runtime and
space complexity for CRUD operations the same in either case)  which one
would you choose and why?

Re: which one of the following choices is more efficient?

Posted by Kant Kodali <ka...@peernova.com>.
@Benjamin Roth I think you kinda of answered my question. my use case is
really that I need to store a SkipList like structure into one or multiple
tables. I could map the entire skip list like structure into one table or I
could map a list at every level into another table and the number of levels
are not necessarily logN in my case because I may divide the number of
nodes at each level by 1/4 or 1/8.

On Wed, Oct 26, 2016 at 1:24 AM, Kant Kodali <ka...@peernova.com> wrote:

> @Ali hmm..I didn't mean to say I store the same data across two tables and
> neither tables are dependent for me to do the writes twice. you can imagine
> tables are independent and the data is unique across tables but I could
> store data from multiple tables into one table. otherwords I am just
> restating my first question.
>
> On Wed, Oct 26, 2016 at 1:19 AM, Ali Akhtar <al...@gmail.com> wrote:
>
>> You would need to do each write twice and data will take up twice the
>> space as its duplicated in two places.
>>
>> On Wed, Oct 26, 2016 at 1:17 PM, Kant Kodali <ka...@peernova.com> wrote:
>>
>>> I guess the question can be rephrased into "What is the overhead of
>>> creating and maintaining an additional table?"
>>>
>>> On Wed, Oct 26, 2016 at 1:12 AM, Ali Akhtar <al...@gmail.com>
>>> wrote:
>>>
>>>> Depends on the use case. No one right answer.
>>>>
>>>> On Wed, Oct 26, 2016 at 1:03 PM, Kant Kodali <ka...@peernova.com> wrote:
>>>>
>>>>> If one were given a choice of fitting all the data into one table vs
>>>>> fitting the data into two tables while say (keeping all the runtime and
>>>>> space complexity for CRUD operations the same in either case)  which one
>>>>> would you choose and why?
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: which one of the following choices is more efficient?

Posted by Kant Kodali <ka...@peernova.com>.
@Ali hmm..I didn't mean to say I store the same data across two tables and
neither tables are dependent for me to do the writes twice. you can imagine
tables are independent and the data is unique across tables but I could
store data from multiple tables into one table. otherwords I am just
restating my first question.

On Wed, Oct 26, 2016 at 1:19 AM, Ali Akhtar <al...@gmail.com> wrote:

> You would need to do each write twice and data will take up twice the
> space as its duplicated in two places.
>
> On Wed, Oct 26, 2016 at 1:17 PM, Kant Kodali <ka...@peernova.com> wrote:
>
>> I guess the question can be rephrased into "What is the overhead of
>> creating and maintaining an additional table?"
>>
>> On Wed, Oct 26, 2016 at 1:12 AM, Ali Akhtar <al...@gmail.com> wrote:
>>
>>> Depends on the use case. No one right answer.
>>>
>>> On Wed, Oct 26, 2016 at 1:03 PM, Kant Kodali <ka...@peernova.com> wrote:
>>>
>>>> If one were given a choice of fitting all the data into one table vs
>>>> fitting the data into two tables while say (keeping all the runtime and
>>>> space complexity for CRUD operations the same in either case)  which one
>>>> would you choose and why?
>>>>
>>>>
>>>
>>
>

Re: which one of the following choices is more efficient?

Posted by Ali Akhtar <al...@gmail.com>.
You would need to do each write twice and data will take up twice the space
as its duplicated in two places.

On Wed, Oct 26, 2016 at 1:17 PM, Kant Kodali <ka...@peernova.com> wrote:

> I guess the question can be rephrased into "What is the overhead of
> creating and maintaining an additional table?"
>
> On Wed, Oct 26, 2016 at 1:12 AM, Ali Akhtar <al...@gmail.com> wrote:
>
>> Depends on the use case. No one right answer.
>>
>> On Wed, Oct 26, 2016 at 1:03 PM, Kant Kodali <ka...@peernova.com> wrote:
>>
>>> If one were given a choice of fitting all the data into one table vs
>>> fitting the data into two tables while say (keeping all the runtime and
>>> space complexity for CRUD operations the same in either case)  which one
>>> would you choose and why?
>>>
>>>
>>
>

Re: which one of the following choices is more efficient?

Posted by Benjamin Roth <be...@jaumo.com>.
If you have 2 tables that share the same PK and have few fields and most of
the rows have values for all (or many fields), merging them could save you
some space as for each table, each PK has to be stored in both tables.
But I would avoid having "god tables" with too many fields.

But at the end again: It depends you model. Think thoroughly about it.

2016-10-26 10:17 GMT+02:00 Kant Kodali <ka...@peernova.com>:

> I guess the question can be rephrased into "What is the overhead of
> creating and maintaining an additional table?"
>
> On Wed, Oct 26, 2016 at 1:12 AM, Ali Akhtar <al...@gmail.com> wrote:
>
>> Depends on the use case. No one right answer.
>>
>> On Wed, Oct 26, 2016 at 1:03 PM, Kant Kodali <ka...@peernova.com> wrote:
>>
>>> If one were given a choice of fitting all the data into one table vs
>>> fitting the data into two tables while say (keeping all the runtime and
>>> space complexity for CRUD operations the same in either case)  which one
>>> would you choose and why?
>>>
>>>
>>
>


-- 
Benjamin Roth
Prokurist

Jaumo GmbH · www.jaumo.com
Wehrstraße 46 · 73035 Göppingen · Germany
Phone +49 7161 304880-6 · Fax +49 7161 304880-1
AG Ulm · HRB 731058 · Managing Director: Jens Kammerer

Re: which one of the following choices is more efficient?

Posted by Kant Kodali <ka...@peernova.com>.
I guess the question can be rephrased into "What is the overhead of
creating and maintaining an additional table?"

On Wed, Oct 26, 2016 at 1:12 AM, Ali Akhtar <al...@gmail.com> wrote:

> Depends on the use case. No one right answer.
>
> On Wed, Oct 26, 2016 at 1:03 PM, Kant Kodali <ka...@peernova.com> wrote:
>
>> If one were given a choice of fitting all the data into one table vs
>> fitting the data into two tables while say (keeping all the runtime and
>> space complexity for CRUD operations the same in either case)  which one
>> would you choose and why?
>>
>>
>

Re: which one of the following choices is more efficient?

Posted by Ali Akhtar <al...@gmail.com>.
Depends on the use case. No one right answer.

On Wed, Oct 26, 2016 at 1:03 PM, Kant Kodali <ka...@peernova.com> wrote:

> If one were given a choice of fitting all the data into one table vs
> fitting the data into two tables while say (keeping all the runtime and
> space complexity for CRUD operations the same in either case)  which one
> would you choose and why?
>
>