Does creating a nonclustered index on a SQL Server 2005 table prevent selects?

I’d like to create an index on a view I have but I need to make sure the data can still be read while the index is being created. I was reading an article that suggested that when creating a nonclustered index that the data is still readable if you specify the ONLINE=ON option (example … Read more

Index not used when LIMIT is used in postgres

I have a words table with an index on (language_id, state). Here are the results for EXPLAIN ANALYZE: No limit explain analyze SELECT “words”.* FROM “words” WHERE (words.language_id = 27) AND (state IS NULL); Bitmap Heap Scan on words (cost=10800.38..134324.10 rows=441257 width=96) (actual time=233.257..416.026 rows=540556 loops=1) Recheck Cond: ((language_id = 27) AND (state IS NULL)) … Read more

Unable to add files with name containing tilde, ‘~’ followed by a number

The folder consists of files with filenames like abc~1, 123~1, a1d2~3. When I do git add –all it says, $ git add –all error: Invalid path ‘abc~1.png’ error: unable to add abc~1.png to index fatal: adding files failed I did a trial and error and I found this error persists only when the tilde symbol … Read more

Does an index < or > MySQL queries?

If I have a query like, DELETE FROM table WHERE datetime_field < ‘2008-01-01 00:00:00’ does having the datetime_field column indexed help? i.e. is the index only useful when using equality (or inequality) testing, or is it useful when doing an ordered comparison as well? (Suggestions for better executing this query, without recreating the table, would … Read more

SQL Server Partitioning – Unique Index Error

I have a table that is partitioned by TRANSACTION_DATE_TIME. Table has a column: ID. I want to create a unique index for ID on partition scheme as: CREATE UNIQUE NONCLUSTERED INDEX [IX_ID_ON_PS_DATETIME] ON [CRD].[TRANSACTION] ( [ID] ASC ) ON [PS_DATETIME_WEEKLY]([TRANSACTION_DATE_TIME]) but SQL says “Partition column for a unique index must be a subset of index … Read more

Spring Data – MongoDB indexing DBRef

I’m using spring-data-mongodb-1.2.0.RELEASE. I have two classes A and B where B has a reference to A and it is annotated with @DBRef. Class A: @Document(collection = “a”) public class A { @Id public String id; /** The TicketGrantingTicket this is associated with. */ @Field public String name; public A(String id, String name) { this.id … Read more

Index on which tablespace

How to find out which ‘tablespace’ a particular ‘index’ belongs to. (oracle) (need to use it via jdbc) Answer The information is in the ALL_INDEXES (or USER_INDEXES) view: select tablespace_name from all_indexes where owner = ‘MYSCHEMA’ and index_name = ‘MYINDEX’; AttributionSource : Link , Question Author : frewper , Answer Author : Tony Andrews