2010/7/7 Felix Schlesinger <schle...@cshl.edu>

> Francesc Alted <faltet <at> pytables.org> writes:
> > > Between 1 and 5.
> >
> > Mmh, this is not very much.  Given that, I'd try to put that info in a
> > multidimensional column of the same table.  The column can be defined
> > something like Int32Col(shape=(5,2)), that is, up to 5 pairs of 32-bit
> > integers.  Then, another column (Int8Col) can have the actual number of
> > valid entries.  This is 5x2x4+1=41 bytes of maximum overhead per row,
> > which is not that much.
>
> This is what I did before and it does work. However most table rows have 0
> entriesin this field, so that adding a column with shape (5,2) adds a lot
> of
> unused space to the database. I have not yet checked how blosc compression
>  will help with this.


Well, unfortunately Blosc is geared to get maximum speed, and not so much
about increasing compression ratio, so I don't think it would be of a lot of
help here.


> If EArray appends are much faster then VLArray appends
> I might go with that. More benchmarking needed as always.
>

Yes.  Some benchmarks would be nice to have.


>
> On a related note: What is the prefered way to fill a CArray? createCArray
> does
> not take an array element (as opposed to createArray). Is the best thing to
> do
> to build the array in memory and then:
>
> nparr = SomeArray()
> carr = tables.createCArray(...)
> carr[:] = nparr
>

Exactly, this is the recommended way.


>
> Creating the empty CArray first and then filling it (in my case with lots
> of
> random access) seems to be much slower.
>
> Felix
> _________________
> Pytables-users mailing list
> Pytables-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pytables-users
>

-- 
Francesc Alted
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to