Help creating index's for this query...

2006-03-10 Thread Cory at SkyVantage
I need help, I'm somewhat new to indexing, I am joining two tables and need to optimize the speed of the query. I'm running the NDB storage engine so the foreign key stuff is disabled. With that in mind, here's the query and additional comments below: SELECT COUNT(*) Count FROM

Re: Help creating index's for this query...

2006-03-10 Thread gerald_clark
Cory at SkyVantage wrote: I need help, I'm somewhat new to indexing, I am joining two tables and need to optimize the speed of the query. I'm running the NDB storage engine so the foreign key stuff is disabled. With that in mind, here's the query and additional comments below: SELECT

Re: Help creating index's for this query...

2006-03-10 Thread Cory at SkyVantage
gerald_clark wrote: Cory at SkyVantage wrote: *** 1. row *** id: 1 select_type: SIMPLE table: status type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 100 Extra:

Re: Help creating index's for this query...

2006-03-10 Thread SGreen
Cory at SkyVantage [EMAIL PROTECTED] wrote on 03/10/2006 03:52:56 PM: I need help, I'm somewhat new to indexing, I am joining two tables and need to optimize the speed of the query. I'm running the NDB storage engine so the foreign key stuff is disabled. With that in mind, here's the

Re: Help creating index's for this query...

2006-03-10 Thread gerald_clark
Cory at SkyVantage wrote: gerald_clark wrote: Cory at SkyVantage wrote: *** 1. row *** id: 1 select_type: SIMPLE table: status type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL

Re: Help creating index's for this query...

2006-03-10 Thread Cory at SkyVantage
[EMAIL PROTECTED] wrote: Can you post the results of SHOW CREATE TABLE pnr_segments, please pnr_segments | CREATE TABLE `pnr_segments` ( `ID` bigint(20) NOT NULL auto_increment, `ID_pnr` bigint(20) NOT NULL, `ID_pnr_fares` bigint(20) NOT NULL, `flight_number` int(10) unsigned NOT NULL,

Re: Help creating index's for this query...

2006-03-10 Thread Cory at SkyVantage
gerald_clark wrote: How many possible values may res_status have? What percentage for each value? It may not be possible to use an index on this field. The res_status field may have up to 10 different values from 0-9. and there will be a huge amounts of '0' and thousands of records with 1-9

Re: Help creating index's for this query...

2006-03-10 Thread gerald_clark
Cory at SkyVantage wrote: gerald_clark wrote: How many possible values may res_status have? What percentage for each value? It may not be possible to use an index on this field. The res_status field may have up to 10 different values from 0-9. and there will be a huge amounts of '0' and

Re: Help creating index's for this query...

2006-03-10 Thread SGreen
Cory at SkyVantage [EMAIL PROTECTED] wrote on 03/10/2006 04:25:00 PM: [EMAIL PROTECTED] wrote: Can you post the results of SHOW CREATE TABLE pnr_segments, please pnr_segments | CREATE TABLE `pnr_segments` ( `ID` bigint(20) NOT NULL auto_increment, `ID_pnr` bigint(20) NOT NULL,