index

What is mysql indexes?

I don't get what is that? It's id which auto increase number? ...

Defining indexes: Which Columns, and Performance Impact?

I know how to use indexes(clustured and non clustured) But when should i use non clustured indexes in my table. What scenarios should be there, so as to make my column non clustured index. I have gone throught msdn guidelines but still little bit confusion. Should i make only unique columns as NC or should there any other columns also a...

automate check index cardinality in MySQL

I have ran into some problems with MySQL that causes our index cardinality to show up as "NULL". I have noticed that for an index with multiple columns, only the Last column has an actual cardinality value. I have written this query but I want to confirm that there is nothing that I am missing: SELECT s.TABLE_SCHEMA, s.TABLE_NAM...

How to delete unique index referenced by foreign keys?

I have a table, let's call it Users. This table has primary key called Id. Despite having Id as primary key (unique clustered), it has other index (unique nonclustered) on the same column(Id). I would like to drop this constraint, but foreign keys reference this unique nonclustered index and I get The constraint ... is being referenced...

Insertion of data after creating index on empty table or creating unique index after inserting data on oracle?

Which option is better and faster? Insertion of data after creating index on empty table or creating unique index after inserting data. I have around 10M rows to insert. Which option would be better so that I could have least downtime. ...

How to drop this index in MySQL?

It's created this way: create table listings( id integer unsigned NOT NULL AUTO_INCREMENT, accountId integer unsigned default null, title varchar(300) not null, country integer unsigned, region integer unsigned, type integer unsigned, price integer, unit varchar(20) not null, priceUSD decimal(12,2), ...

mysql speed up delete statement

i have some delete queries to run against some pretty huge table (~100 GB), and i want to optimize them as much as possible: delete from table1 where column1 < date_sub(now(), interval 100 hour); column1 is a datetime column, i assume making an index for this column will speed up the deletions. besides that, anything i can do here? wi...

Problem with jQuery index()

There must be something simple I am missing. I'm trying to get the index of the element but keep getting -1. HTML: <div id="rating_boxes"> <img src="/img/ratingbox.gif" class="ratingbox" alt="Rate this Speech" /> <img src="/img/ratingbox.gif" class="ratingbox" alt="Rate this Speech" /> <img src="/img/ratingbox.gif" class="ratingbox" a...

Why would index.php only work some of the time?

I just moved a develoment site onto a test production server and I'm testing some things out. When you go to the root URL (ie rooturl.com), the browser is correctly rendering rooturl.com/index.php without showing the index.php in the address bar. However, I also have a directory at rooturl.com/admin that also has an index file of index...

Wordpress Posting News Items Side By Side, Not Stacked

Hi everyone. I am designing a site with wordpress. My index page keeps posting news items side by side, and nomatter how I try to modify my code, it will not place a break between the two. To see what I mean, visit www.acacians.net. Here is the chunk of code in my template that controls the "News Post" portion of the page: <table wi...

Indexes for inner joins with where clause

If I had the following query: select some cols from tbl_a INNER JOIN tbl_b ON tbl_a.orderNumber = tbl_b.orderNumber where tlb_b.status = 'XX' Assuming both tables have clustered indexes on order number only, would it be better from a performance perspective to extend the clustered index on table b to include the status column r...

Position of character to the left of current position in string

From some arbitrary position in a string I need to find the closest position of a character to the left of my position. If I was wanting to perform this operation to the right I could just use .IndexOf, but how to do it to the left I am unsure. The two ways I came up with were just a decrementing loop starting at my position or, puttin...

File upload error cakephp

When I choose an image and push upload, I get this error in my controller: Notice (8): Undefined index: File [APP/controllers/garage_car_images_controller.php, line 22] I've also noticed that the $form->create line shown below does NOT generate form code in the inspected html. This is VERY weird. Any ideas how to fix this? Thanks!...

Getting index of a row in a list

Hi, I have a paging method that uses the criteria API's SetMaxResults and SetFirstResult. Functionally, it works fine. What I'd like to do now is provide another method that retrieves the index of a given item within the set of all items, thus allowing me to calculate what page that item is in. I am able to calculate the index correct...

What kind of index on dates for a emp duty table?

I have a query that gets all employee duties for a start date and end date against a database. Basically the table would be like Emp Duty StartDate EndDate Should I give indexing for dates? what kind etc? to make things easier on db level (orm level for me it would be an attribute to set).There will be huge data depending on number ...

Export VSD (visio) to text file

I'm no programmer but I'm sure this community can help. I have thosands of VSD files in a LAN share that I want to create a simple searchable index for. I want to be able to have the contents of each VSD file in clear text for manipluation in either windows or unix shell script that could be used for searching the clear txt output. Can...

accessing specific icons from a Multi-Icon (.ico) file

Dear community. I would like to know if the following is possible. I have an .ico file, containing several sizes and color depths. However, it also contains some custom made sizes, that are going to be used inside my application. The application accesses the icon trough a resource DLL. (The intention is that the DLL is provided by a t...

When to add index on joined tables

I have a mysql table with 9 million records that doesn't have any indices set. I need to join this to another table based on a common ID. I'm going to add an index to this ID, but I also have other fields in the select and where clause. Should I add an index to all of the fields in the where clause? What about the fields in the s...

SQL Server index advice performance

Hi Guys, I'm looking for some advice to how to get the indexes running better on this query... SQL Server 2005/8 some customers have 5 some 8... SELECT sales.ChainStoreId, sales.CashBoxId, dbo.DateOnly2(sales.BonDate), MAX(sales.BonDate), SUM(sales.SumPrice) FROM [BACK_CDM_CLEAN_BOL...

iPhone - scroll UITableView to index

Once my UITableView has been populated with data, I want to scroll to a specific index. I think this is how you do it: [[self tableView] scrollToRowAtIndexPath:[NSIndexPath indexPathWithIndex:3] atScrollPosition:UITableViewScrollPositionMiddle animated:NO]; The problem is when I'm supposed to run this. How do you know when a table has...