indexing

Optimizing 'for-loops' over arrays in C99 with different indexing.

Hi there, I want to speed up an array multiplication in C99. This is the original for loops: for(int i=0;i<n;i++) { for(int j=0;j<m;j++) { total[j]+= w[j][i] * x[i]; } } My boss asked my to try this, but it did not improve the speed: for(int i=0;i<n;i++) { float value = x[i]; for(int...

What is the difference in rebuilding an index on index-organized table and an ordinary table?

From this article about index organized tables, Note that rebuilding a secondary index on an index-organized table involves reading the base table, unlike rebuilding an index on an ordinary table. Why does rebuilding of an index on an ordinary table not require reading the base table? ...

How does index rebuilding happen after a table is updated?

original simple table A ------------------------ rowid id name 123 1 A 124 4 G 125 2 R 126 3 P index on A.id ------------- id rowid 1 123 2 125 3 126 4 124 updated simple table A ---------------------- rowid id name 123 1 A 124 5 G 125 2 R 126 7 P Assumin...

How is a table UPDATE handled by a RDBMS?

Suppose I have a table and an index on it original simple table A ------------------------ rowid | id name 123 | 1 A 124 | 4 G 125 | 2 R 126 | 3 P index on A.id ------------- id rowid 1 123 2 125 3 126 4 124 At this point, I execute this DML statement UPDATE A SET id = 5 WHERE id = 4 What e...

Best way to perform online re-indexing of tables for Zend_Search_Lucene-powered search

Hi, I'm using Zend_Search_Lucene for full-text search of records in several different tables in my application. I have just implemented this functionality, and currently the index is built upon first use of the search functionality after application deployment. This is obviously not what I would like in production. I'm looking for an e...

How are bitmap indexes helpful?

Wikipedia gives this example Identifier Gender Bitmaps F M 1 Female 1 0 2 Male 0 1 3 Male 0 1 4 Unspecified 0 0 5 Female 1 0 But I do not understand this. How is this an i...

How to see a list of all the indexes (including implicit ones) in SQL*Plus?

Is there some way to get a list of all the indexes on a particular table using SQL*Plus? I created a table CREATE TABLE temp( id NUMBER PRIMARY KEY, name VARCHAR2(20)); There should be an implicit index created on the primary key (id). How can I see that index? SELECT * FROM all_indexes WHERE table_name = 'temp'; gives no rows se...

How can I see the contents of an Oracle index?

Is it possible to have a look at what is there inside an index using SQL*Plus? If I have a table like this: Table A ------------------------ rowid | id name 123 | 1 A 124 | 4 G 125 | 2 R 126 | 3 P where id is the primary key, I expect the index to be something like this index on A.id ------------- id ...

Solr Index update - specific field only

When i update specific fields in solr, it deletes the original fields that are missing in the update request. Is it possible to change this behavior?? ...

Best practice to identify an UIImageView in a NSMutableArray?

I am going to addObject of 8 UIImageView * to a NSMutableArray. Each UIImageView is User Interaction Enabled. When a user touches one of the UIImageViews, what is the best way to recall the index position of the selected UIImageView' in theNSMutableArray`? I can imagine: sub-class UIImageView and add a NSUInteger index attribute t...

Indexing Null Values in PostgreSQL

I have a query of the form: select m.id from mytable m left outer join othertable o on o.m_id = m.id and o.col1 is not null and o.col2 is not null and o.col3 is not null where o.id is null The query returns a few hundred records, although the tables have millions of rows, and it takes forever to run (around an hour). When I check...

How to index portable hard disk (2.5") ?

How to index my portable hard disk (2.5") ? having lots of materials in the harddisk, searching becomes harder. Is there a way that i can index my entire hard disk (for txt / pdf / html ) files and just search the content like a google desktop ? ...

How to: Manage multiple overlapping indexes in SQL Server 2005

For the sake of example, I have a table with columns A B C D E F G H. I have created two indexes on the table that correspond to the most used queries. The first is on columns B C D and E. The second is on B C D E and F. The queries that use these columns are called the same number of times and they are each optimized with respect to...

jQuery UI Sortable removing or adding an item trigger refresh the id

Help! I'm still very, very lost. After a lot of help, I was able to figure how to trigger a row add before an existing row, move a row without firing off a bound 'click' and a few other things. Here's the issue: I need this list to refresh the id's, no matter what action I take. When I remove a row, it works fine but adding a row, moving...

SQL non-clustered index

I have a table that maps a user's permissions to a given object. So, it is essentially a join table to 3 different tables. (Object, User, and Permission) The values of each row will always be unique for all 3 columns, but not any 2. I need to create a non-clustered index. I want to put the index on the foreign keys to the object and u...

Will Microsoft SQL Server efficiently handle a non-persisted computed column?

I'm having a hard time phrasing this question in such a way that doesn't turn up results for persisted, indexed computed columns. My question is, if I have a table such as: CREATE TABLE Customers ( ID int, Name nvarchar(50), Balance money, HasBalance AS CONVERT(bit, CASE WHEN Balance > 0 THEN 1 ELSE 0 END) ) Assuming ...

NHibernate and SQLite: will an IgnoreCase() query be an indexed lookup or not?

The Foo column is defined as "Foo TEXT unique". Will an Eq().IgnoreCase() query use the index or will it perform a complete column scan? The query: string foo = "foo"; IList<T> list = session.CreateCriteria(typeof(T)). Add(Expression.Eq("Foo", foo).IgnoreCase()).List<T>(); ...

Text keyword search in 200 or so char text field on database

Here's the situation, hugely grateful for any input anyone may have: I have a table of about 100m rows, with (among several other fields), a text field that we can call 'product'. The product field is about 200 chars long, and contains details of, yes, products. I want to give users the ability to search through these items by entering...

lucene usage on trec data.

Hello, Does anyone know of any publicly available Question answering applications which have built using lucene on TREC data? Thanks ...

Can [My]SQL combine multiple overlapping composite indexes?

Basically, if I have a table with composite indices (colA, colB, colC) and (colB, colD, colE), is MySQL able to take advantage of their overlap on colB to combine them and speed up a query involving colA, colB and colD, even if there is no single index covering these three particular columns? I tried using EXPLAIN on a test case like th...