Given a table (id, col1, col2), does it make sense to create the following indexes:
Index1 (col1) not unique
Index2 (col1, col2) not unique
I am faced with a legacy database that is full of those.
Can I safely delete Index1? Anwser needed for SQL Server and Oracle.
...
Hi!
I'm working with PostgreSQL to create some data types written in C.
For example, I have:
typedef struct Point3D
{
char id[50];
double x;
double y;
double z;
} Point3D;
The input and output functions are working properly.
But the problem is the following:
Every id of Point3D must be unique (and can be NULL), so I ...
I have an online application that all of its pages use HTTPS. I have 3 questions:
Does Google index HTTPS pages?
I have a password protected single ASP.NET page (using HTTPS). Password protection is basically achieved by a Session object. When the correct password is entered, it hides the login panel and displays the same page which ha...
This is a multipart Indes question:
Is there a way one can create index
on index?
Why would one wish to to so?
And if so, are ther any examples?
...
In the Javascript, could I define a class, the class itself can also when a function call, similar to the index, such as:
function A()
{
}
var a=new A();
var v=a(); //Use ordinary/like Javascript function use
...
Even this isn't working....
$("table#mytable > tbody > tr").each(function(index) {
if($(this).attr('id','firstrow')) {
$("input[name^=f1]").focus(function() {
var newRow = '<tr><td></td><td></td></tr>';
$("tbody").append(newRow);
});
} else {
$("input[name^=f2]").focus(fu...
In the many search functions of C (bsearch comes to mind) if a result is found, a pointer to the spot in the array is returned. How can I convert this pointer to the index in the array that was searched (using pointer arithmetic, i assume).
...
Hello.
I'm working on a sql query, and trying to optimise it, because it takes too long to execute.
I have a few select and UNION between.
Every select is on the same table but with different condition in WHERE clause.
Basically I have allways something like :
select * from A
where field1 <=TO_DATE ('01/01/2010', 'DD/MM/YYYY')
AND fie...
I'm currently trying to figure out how to pass an index range as a string, but so far have not been having any luck. Here is an example of what I'm trying to do:
pos = %w{1 2..4}
values = %{x cat}
test_string = "This is a test with a string."
test_string[pos[1]] = values[1]
I know I could just break it down with split or something s...
When I run this SQL statement:
CREATE UNIQUE INDEX WordsIndex ON Words (Word ASC);
I get the following exception message:
The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.Words' and the index name 'WordsIndex'. The duplicate key value is (ass).
The statement has been term...
How do you drop an index only if it exists?
It seems simple but I did found anything on the net.
The idea is to drop it only if it exists, because if not, I will have an error and my process stops.
I found this to find if the index exists:
select index_name
from user_indexes
where table_name = 'myTable'
and index_name='myIndexName'
...
I am using the performance dashboard with our SQL Server 2005 databases and it lists what it considers to be missing indexes. But some of those indexes DO exist! They are not disabled, and they are defined exactly as the dashboard says they should be. Why are they reported as missing?
...
Hi all i need your help !
i wanna write javascript function to change the text Lasvegas in string:
ex:
"Hello every one in Lasvegas, come <a href='xxx'>Lasvegas</a> with me"
How can i change the text but not change content Lasvegas in start tag and end tag
...
I have an expression that gives a matrix and I want to access an element, without creating a temporary variable, something like this cov(M)(1,1). How can I do it?
Thanks!
...
I am struggling understanding what a clustered index in SQL Server 2005 is. I read the MSDN article Clustered Index Structures (among other things) but I am still unsure if I understand it correctly.
The (main) question is: what happens if I insert a row (with a "low" key) into a table with a clustered index?
The above mentioned MSDN a...
I've got a table (col1, col2, ...) with an index on (col1, col2, ...). The table has got millions of rows in it, and I want to run a query:
SELECT col1, COUNT(col2) WHERE col1 NOT IN (<couple of exclusions>) GROUP BY col1
Unfortunately, this is resulting in a full table scan of the table, which takes upwards of a minute. Is there any...
Hello All,
I have been building index on a 200 million row table for almost 14 hours. Due to resource over-consumption on the machine (because of a separate incident), the machine cashed. Clearly, I want to avoid another 14 hours to re-construct the index. Is there a way that I can resume the construction of index from the point (or sli...
I have a table storing millions of rows. It looks something like this:
Table_Docs
ID, Bigint (Identity col)
OutputFileID, int
Sequence, int
…(many other fields)
We find ourselves in a situation where the developer who designed it made the OutputFileID the clustered index. It is not unique. There can be thousands of records with this I...
I've been looking at MongoDB. Feels good.
I added some indexes to a collection, uploaded a bunch of data, then removed all the data, and I noticed the indexes did not change size, similar to the behavior reported here.
If I call
db.repairDatabase()
the indexes are then squashed to near-zero. Similarly if I don't remove all the d...
Python's list type has an index(x) method. It takes a single parameter x, and returns the (integer) index of the first item in the list that has the value x.
Basically, I need to invert the index(x) method. I need to get the index of the first value in a list that does NOT have the value x. I would probably be able to even just use a fu...