From: damon f. <dam...@ya...> - 2005-02-14 08:43:31
|
Hi, I'm having some trouble generating an index on a Table column. Actually, I think the index is created, but I can't access it the next time I open the file. I have a job which creates a very simple pytables file. Just one group with 4 pretty simple tables. I dump a bunch of data into the tables. There is one column on which I will usually select, so I would like to create an index on this column. In order to get experience with pytables, I've done two runs over the same input data. In the first run I did not index any columns. In the second run I indexed the column of interest. I'm certain the index was generated because a) I created the IsDescription class with indexed=1 for that column (very straightforward), b) that was the only difference between the scripts for the two runs and the output file for the indexed run was about 20% larger than the output file with no index. When I access data (in a later Python session), using the where operator to select on the indexed column, the access is pretty slow, and in fact, it is SLOWER when I run using the file with the index. I'm pretty sure that the index is in the file (because the file is bigger) but it is not seen when I open the file. If I print the file (by typing the symbol returned by openFile()) none of the columns are indicated as having been indexed. Yet, if I print the file during the session in which it was originally created, the column which I asked to be indexed is indeed indicated as so. I reproduced the error in an interactive session with a simpler file structure. I have attached the screen dump of that session as 'pytables.indextest.session'. I've added a few annotations to this file, but it should be pretty easy to see the problem. I've attached another file, 'pytables.install.session' which is a screendump of the session where I built installed and tested pytables. From there you can see the details of my configuration. I think everything is in order. So, a lot of words, but a single question. What happened to my index...and how can I make it not happend? Thanks! Damon __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |