indexing

Get the index of an element in a queryset

Hi I have a QuerySet, let's call it qs, which is ordered by some attribute which is irrelevant to this problem. Then I have an object, let's call it obj. Now I'd like to know at what index obj has in qs, as efficiently as possible. I know that I could use .index() from Python or possibly loop through qs comparing each object to obj, bu...

Index for multiple columns in ActiveRecord

In ActiveRecord there are two ways to declare indexes for multiple columns: add_index :classifications, [:species, :family, :trivial_names] add_index :classifications, :species add_index :classifications, :family add_index :classifications, :trivial_names Is there any difference between the first approach and the second one? If so, wh...

SQL objects that use an index

Is there a way to see what SQL objects from one data base use a certain index. But I do not want to have to see the execution plan for every object because I have a lot of stored procedures and views PS. It's for SQL 2005 ...

Full Text Search primer?

Can anybody recommend a good book(s)/paper(s)/article(s) on Full Text Search (and maybe indexing in general). I'm pretty anal about having to understand what's happening behind the scenes in my applications, and I'm having trouble understanding why Sphinx and other external FTS's leaves MySQL/MyISAM in the dust. ...

How to: Increase Lucene .net Indexing Speed

I am trying to create an lucene of around 2 million records. The indexing time is around 9 hours. Could you please suggest how to increase performance? ...

Sql Server Full Text Search - Getting word occurances/location in text?

Hi all. Suppose I have Sql Server (2005/2008) create an index from one of my tables. I wish to use my own custom search engine (a little more tuned to my needs than Full Text Search). In order to use it however, I need Sql Server to provide me the word positions and other data required by the search engine. Is there anyway to query t...

How can I remove copyrighted trademarks indexed by Google?

A company has issued the company I work for a cease and desist for a certain term we have been using to describe many products on the website. So we are currently going to do as they say and replace that term with a different term. But the problem is, the search feature on our web site is powered by Google site search. And when I make a ...

Temporarily lock folder from reading with ASP.NET

I am working on an indexing/searching feature of a site. The indexing runs every 6 hours and takes about 2 minutes. What is the best approach to forbid the reading from the indexes folder during these 2 minutes? ...

Same query uses different indexes?

Can a select query use different indexes if a change the value of a where condition? The two following queries use different indexes and the only difference is the value of the condition and typeenvoi='EXPORT' or and typeenvoi='MAIL' select numenvoi,adrdest,nomdest,etat,nbessais,numappel,description,typeperiode,datedebut,datefin,codeet...

iphone indexed table view problem

I have a table view in which I'm using sectionIndexTitlesForTableView to display an index. However, when I scroll the table, the index scrolls with it. This also results in very slow refreshing of the table. Is there something obvious I could be doing wrong? I want the index to remain in place on the right while the table scrolls. This i...

AS3 - Keeping a sparse array sparse

I'm working with an array in AS3, which is sparse by default. I make an array and add a value to it at a given position. I nullify it's contents at that index. It retains that index value, but nullifies the contents. The issue is that the length still traces the same. Is there a way to actually remove that index without modifying any of ...

Is the primary key automatically indexed in MySQL?

Do you need to explicitly create this or is it implicit when define the primary key? Is the answer the same for MyISAM and InnoDB? ...

Any common algorithms for indexing / searching through my data?

Hi all.. I know that searching in itself is a huge field, which also seems to be my problem. I just don't know where to start. Here's the scenario: I got a lot of shops which employs a lot of people and which has a lot of different products for sale. I need to create a single-textfield searchoption for my site. This textfield should s...

Can I tell Mysql which indices to keep in memory regardless of other indices?

My database is bigger than the amount of memory I have on the computer. I would like to keep a couple of most used indices in the memory regardless of all other caching. Do you know if it is possible, and if yes, how it can be done? ...

javascript array associative AND indexed?

can an array in JS be associative AND indexed? I'd like to be able to lookup an item in the array by its position or a key value.. possible? ...

Is there anyway to assign an index to a control in the WinForms or WPF designer?

I remember VB5 (and all the horrors in it), but one thing I liked about it was that I could set an index on a control in the properties window in the designer. Are there any way to do something like this in WinForms, the WPF designer or XAML ? ...

SQL Server Index performance - long column

In SQL Server (2005+) I need to index a column (exact matches only) that is nvarchar(2000+). What is the most scalable, performant way to approach this? In SQL Server (2005+), what would be the practical difference in indexing on a column with the following types: nvarchar(2000) char(40) binary(16) E.g. would a lookup against an ind...

SQL Server 2000 - How to find out what indexes are in use?

In SQL Server 2000, how can I find out what indexes are being used? I can find a list of all the indexes easily enough, but how do I know which ones can be removed because they are no longer used? I don't want to slog through all the sql used on our server running explain plans to find this out and also risk missing something. ...

Is there a better way to index multiple columns than creating an index for each permutation?

Suppose I have a database table with columns a, b, and c. I plan on doing queries on all three columns, but I'm not sure which columns in particular I'm querying. There's enough rows in the table that an index immensely speeds up the search, but it feels wrong to make all the permutations of possible indexes (like this): a b c a, b a,...

How to use Windows Search Service instead of the old indexing service to index files?

In the past I had the indexing service installed on a Windows Server 2003 and used it to index files for my website. I did this by executing an OleDbCommand with a query and a connection string. How do I accomplish the same thing with the new "Windows Search Service" (Windows Server 2008) by using VB.NET? Does this work the same way so ...