I'm running into an interesting argument with a DBA who insists that the DELETE command should not be used in T-SQL, that instead the proper way to remove data is to move the data you'd like to keep to a temp table, and drop and re-create the original table. The justification given for this is that it should prevent index fragmentation i...
I have individual indexes on, say, columns A, B and C. I'd like to create a composite index on the three columns A+B+C.
What impact will my existing indexes have on composite index creation? Will the database take advantage of them, are they irrelevant, or will they slow down the creation of my new composite index?
I'm using MySql 5.1....
I have a table where I need to force a column to have unique values.
This column must be nullable and by business logic multiple NULL values should be permitted, whereas other duplicate values are not.
SQL Server UNIQUE constraint is no good in this situation because it considers NULL as regular values, so it will reject duplicate NULLs...
For DB2...
table1.a is varchar(30) and has an index on it.
table2.b is varchar(45) and has an index on it.
Will table1.a = table2.b use the index on table1, table2, or both?
Although it would seem obvious that it should use both indexes, I'm asking because I believe on sybase, this would only use one of the indexes (I'm not sure which...
Anybody know of an IFilter that can index source code files beyond what the "Plain Text" filter can provide, with possibly a custom "Property Set" specific to programming?
For example, I have 835MB in 41,000 files and 8,200 folders in my "Code Library" folder. I would like to perform searches such as "select distinct attributes on prop...
Hi !
I'd like to understand the SQL Server 2008 Filtered Index Feature.
How does the Database Engine deal wih this concept ? And how is it going to help me get faster results than standard indexes while querying large tables ?
Can anybody help me on this ?
Thanks.
...
I have a sql like this:
SELECT * FROM tableA WHERE column_a = sth AND colun_b > sth
so, how do I create index for it?
One index for two column
Two indexes for each column
which is better?
...
How would you solve this problem? (At the beginning it seemed simple, then I found it to be puzzling).
You have a class called Executor. Suppose you have many instance of it and they do different things upon call of a method do(Argument).
Argument has 2 different parameters and they are A* pa, B* pb (one of which can be null)
Now, I w...
Hi
I want to bind an ItemsControl to an array of object, using ItemsSource and DataTemplate.
And I want to show the index of each item.
Like
Customer 1:
Name: xxxx
Age:888
Customer 2:
Name: yyy
Age: 7777
...
I am working on existing DB and try to optimize it. I see a table without a single primary key but with two foreign keys work as a primary key. I know it will work. however, is it better to have one single primary key with two foreign keys for better performance or primary (key1, key2) will just work as good as one?
For example:
CREA...
I'm in the need of sort of a linked list structure, but if it had indexed access too it would be great.
Is it any way to accomplish that?
EDIT: I'm writing in C, but it may be for any language.
...
hi,
i have a blog build in wordpress, And my domain name is like example.com (i can't give you the original name, because some times the editors will mark this question as SPAM :( , and if any one really want to check directly from my site will add at the end of the question.)
http://example.com and the blog name is http://example.com/...
Hello
There is a set of methods like:
Foo(int, float, params objects[])
Goo(int, params objects[])
Too()
each taking different number of & type of parameters (so are return values).
I read an integer (an index) from a database. The integer corresponds to one of the above mehtod (1 for Foo, 2 for Goo and 3 for Too).
How do I st...
When should I use a composite index in a database?
What are the performance ramification by using a
composite index)?
Why should I use use a composite index?
For example, I have a homes table:
CREATE TABLE IF NOT EXISTS `homes` (
`home_id` int(10) unsigned NOT NULL auto_increment,
`sqft` smallint(5) unsigned NOT NULL,
`year_bui...
I'm supposed to write a web crawler in Java. The crawling part is easy, but the indexing part is difficult. I need to be able to query the indexer and have it return matches (multiple word queries). What would be the best data structure for doing such a thing?
...
I encountered this question in an interview and had no clue how to answer:
There is a table which has a index on a column, and you query:
select * from table_name where column_having_index="some value";
The query takes too long, and you find out that the index is not being used. If you think the performance of the query will be bett...
To optimize SELECT queries, I run them both with and without an index and measure the difference. I run a bunch of different similar queries and try to select different data to make sure that caching doesn't throw off the results. However, on very large tables, indexes take a really long time to create, and I have several different ide...
I think read somewhere that when a View is requested the "map" is only run across documents that have been added since the last time it was requested? How is this determined? I thought I saw something about a sequence number. Is this something that you can get to? Its not part of the UUID trailing on the _rev field is it?
Any way to for...
This is probably a really stupid question, but is there going to be much benefit in indexing a boolean field in a database table?
Given a common situation, like "soft-delete" records which are flagged as inactive, and hence most queries include WHERE deleted = 0, would it help to have that field indexed on its own, or should it be combi...
I'm reading that i can create mahout vectors from a lucene index that can be used to apply the mahout clustering algorithms.
http://cwiki.apache.org/confluence/display/MAHOUT/Creating+Vectors+from+Text
I would like to apply K-means clustering algorithm in the documents in my Lucene index, but it is not clear how can i apply this algorit...