| 1 | DESCRIBE `settings` | | 9 | 9 | 1 |
| 2 | DESCRIBE `setting_categories` | | 5 | 5 | 1 |
| 3 | DESCRIBE `attachments` | | 13 | 13 | 1 |
| 4 | SELECT `Setting`.`id`, `Setting`.`setting_category_id`, `Setting`.`name`, `Setting`.`value`, `Setting`.`description`, `Setting`.`type`, `Setting`.`options`, `Setting`.`label`, `Setting`.`order`, `SettingCategory`.`id`, `SettingCategory`.`created`, `SettingCategory`.`modified`, `SettingCategory`.`name`, `SettingCategory`.`description`, `SiteLogo`.`id`, `SiteLogo`.`created`, `SiteLogo`.`modified`, `SiteLogo`.`class`, `SiteLogo`.`foreign_id`, `SiteLogo`.`filename`, `SiteLogo`.`dir`, `SiteLogo`.`mimetype`, `SiteLogo`.`filesize`, `SiteLogo`.`height`, `SiteLogo`.`width`, `SiteLogo`.`thumb`, `SiteLogo`.`description` FROM `settings` AS `Setting` LEFT JOIN `setting_categories` AS `SettingCategory` ON (`Setting`.`setting_category_id` = `SettingCategory`.`id`) LEFT JOIN `attachments` AS `SiteLogo` ON (`SiteLogo`.`foreign_id` = `Setting`.`id` AND `SiteLogo`.`class` = 'SiteLogo') WHERE 1 = 1 | | 213 | 213 | 1 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | Setting | | ALL | | | | | 213 | 100.00 | |
| 1 | SIMPLE | SettingCategory | | eq_ref | PRIMARY | PRIMARY | 8 | cuponclu_playpen120111.Setting.setting_category_id | 1 | 100.00 | Using index condition |
| 1 | SIMPLE | SiteLogo | | ref | foreign_id,class | foreign_id | 8 | cuponclu_playpen120111.Setting.id | 1 | 100.00 | Using where |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select `cuponclu_playpen120111`.`Setting`.`id` AS `id`,`cuponclu_playpen120111`.`Setting`.`setting_category_id` AS `setting_category_id`,`cuponclu_playpen120111`.`Setting`.`name` AS `name`,`cuponclu_playpen120111`.`Setting`.`value` AS `value`,`cuponclu_playpen120111`.`Setting`.`description` AS `description`,`cuponclu_playpen120111`.`Setting`.`type` AS `type`,`cuponclu_playpen120111`.`Setting`.`options` AS `options`,`cuponclu_playpen120111`.`Setting`.`label` AS `label`,`cuponclu_playpen120111`.`Setting`.`order` AS `order`,`cuponclu_playpen120111`.`SettingCategory`.`id` AS `id`,`cuponclu_playpen120111`.`SettingCategory`.`created` AS `created`,`cuponclu_playpen120111`.`SettingCategory`.`modified` AS `modified`,`cuponclu_playpen120111`.`SettingCategory`.`name` AS `name`,`cuponclu_playpen120111`.`SettingCategory`.`description` AS `description`,`cuponclu_playpen120111`.`SiteLogo`.`id` AS `id`,`cuponclu_playpen120111`.`SiteLogo`.`created` AS `created`,`cuponclu_playpen120111`.`SiteLogo`.`modified` AS `modified`,`cuponclu_playpen120111`.`SiteLogo`.`class` AS `class`,`cuponclu_playpen120111`.`SiteLogo`.`foreign_id` AS `foreign_id`,`cuponclu_playpen120111`.`SiteLogo`.`filename` AS `filename`,`cuponclu_playpen120111`.`SiteLogo`.`dir` AS `dir`,`cuponclu_playpen120111`.`SiteLogo`.`mimetype` AS `mimetype`,`cuponclu_playpen120111`.`SiteLogo`.`filesize` AS `filesize`,`cuponclu_playpen120111`.`SiteLogo`.`height` AS `height`,`cuponclu_playpen120111`.`SiteLogo`.`width` AS `width`,`cuponclu_playpen120111`.`SiteLogo`.`thumb` AS `thumb`,`cuponclu_playpen120111`.`SiteLogo`.`description` AS `description` from `cuponclu_playpen120111`.`settings` `Setting` left join `cuponclu_playpen120111`.`setting_categories` `SettingCategory` on((`cuponclu_playpen120111`.`Setting`.`setting_category_id` = `cuponclu_playpen120111`.`SettingCategory`.`id`)) left join `cuponclu_playpen120111`.`attachments` `SiteLogo` on(((`cuponclu_playpen120111`.`SiteLogo`.`foreign_id` = `cuponclu_playpen120111`.`Setting`.`id`) and (`cuponclu_playpen120111`.`SiteLogo`.`class` = 'SiteLogo'))) where true |
|
| 5 | DESCRIBE `cities` | | 24 | 24 | 0 |
| 6 | DESCRIBE `countries` | | 17 | 17 | 1 |
| 7 | DESCRIBE `states` | | 6 | 6 | 1 |
| 8 | DESCRIBE `languages` | | 7 | 7 | 0 |
| 9 | DESCRIBE `translations` | | 9 | 9 | 1 |
| 10 | DESCRIBE `subscriptions` | | 10 | 10 | 1 |
| 11 | DESCRIBE `users` | | 39 | 39 | 1 |
| 12 | DESCRIBE `user_types` | | 4 | 4 | 0 |
| 13 | DESCRIBE `user_profiles` | | 17 | 17 | 1 |
| 14 | DESCRIBE `genders` | | 4 | 4 | 0 |
| 15 | DESCRIBE `mobile_devices` | | 6 | 6 | 1 |
| 16 | DESCRIBE `user_permission_preferences` | | 9 | 9 | 1 |
| 17 | DESCRIBE `cake_sessions` | | 4 | 4 | 0 |
| 18 | DESCRIBE `companies` | | 25 | 25 | 0 |
| 19 | DESCRIBE `deals` | | 101 | 101 | 1 |
| 20 | DESCRIBE `deal_statuses` | | 5 | 5 | 1 |
| 21 | DESCRIBE `fbpictures` | | 13 | 13 | 0 |
| 22 | DESCRIBE `topics` | | 13 | 13 | 1 |
| 23 | DESCRIBE `topic_types` | | 6 | 6 | 0 |
| 24 | DESCRIBE `fc_companies` | | 33 | 33 | 1 |
| 25 | DESCRIBE `fc_coupons` | | 32 | 32 | 1 |
| 26 | DESCRIBE `fc_categories` | | 2 | 2 | 0 |
| 27 | DESCRIBE `fc_transactions` | | 12 | 12 | 1 |
| 28 | DESCRIBE `user_payment_profiles` | | 9 | 9 | 1 |
| 29 | DESCRIBE `first_sixes` | | 6 | 6 | 1 |
| 30 | DESCRIBE `cybersource_tokens` | | 10 | 10 | 1 |
| 31 | DESCRIBE `fc_company_addresses` | | 11 | 11 | 1 |
| 32 | DESCRIBE `suspect_pws` | | 3 | 3 | 0 |
| 33 | DESCRIBE `user_views` | | 7 | 7 | 0 |
| 34 | DESCRIBE `user_comments` | | 6 | 6 | 2 |
| 35 | DESCRIBE `user_openids` | | 5 | 5 | 1 |
| 36 | DESCRIBE `user_friends` | | 7 | 7 | 1 |
| 37 | DESCRIBE `blocked_users` | | 5 | 5 | 1 |
| 38 | DESCRIBE `user_logins` | | 7 | 7 | 1 |
| 39 | DESCRIBE `deal_users` | | 27 | 27 | 1 |
| 40 | DESCRIBE `paypal_docapture_logs` | | 40 | 40 | 1 |
| 41 | DESCRIBE `paypal_transaction_logs` | | 65 | 65 | 1 |
| 42 | DESCRIBE `transactions` | | 11 | 11 | 1 |
| 43 | DESCRIBE `transaction_types` | | 7 | 7 | 1 |
| 44 | DESCRIBE `payment_gateways` | | 11 | 11 | 0 |
| 45 | DESCRIBE `payment_gateway_settings` | | 10 | 10 | 0 |
| 46 | DESCRIBE `gift_users` | | 12 | 12 | 1 |
| 47 | DESCRIBE `invoices` | | 18 | 18 | 1 |
| 48 | DESCRIBE `invoice_statuses` | | 4 | 4 | 1 |
| 49 | DESCRIBE `fraud_status_logs` | | 8 | 8 | 1 |
| 50 | DESCRIBE `bonus_point_transactions` | | 11 | 11 | 1 |
| 51 | DESCRIBE `bp_transaction_types` | | 7 | 7 | 1 |
| 52 | DESCRIBE `user_cash_withdrawals` | | 7 | 7 | 1 |
| 53 | DESCRIBE `withdrawal_statuses` | | 5 | 5 | 1 |
| 54 | DESCRIBE `city_suggestions` | | 6 | 6 | 0 |
| 55 | DESCRIBE `paypal_mobile_logs` | | 10 | 10 | 1 |
| 56 | DESCRIBE `credomatic_logs` | | 42 | 42 | 1 |
| 57 | DESCRIBE `authorizenet_docapture_logs` | | 14 | 14 | 1 |
| 58 | DESCRIBE `banned_duis` | | 2 | 2 | 1 |
| 59 | DESCRIBE `deal_user_coupons` | | 12 | 12 | 1 |
| 60 | DESCRIBE `fraud_ids` | | 4 | 4 | 0 |
| 61 | DESCRIBE `cybersource_logs` | | 13 | 13 | 1 |
| 62 | DESCRIBE `friend_statuses` | | 4 | 4 | 0 |
| 63 | DESCRIBE `topic_discussions` | | 8 | 8 | 1 |
| 64 | DESCRIBE `topics_users` | | 3 | 3 | 0 |
| 65 | DESCRIBE `deal_categories` | | 5 | 5 | 0 |
| 66 | DESCRIBE `deal_categories_subscriptions` | | 3 | 3 | 0 |
| 67 | DESCRIBE `deal_sub_categories` | | 5 | 5 | 0 |
| 68 | DESCRIBE `pictures` | | 13 | 13 | 0 |
| 69 | DESCRIBE `company_addresses` | | 14 | 14 | 1 |
| 70 | SELECT `City`.`language_id`, `Language`.`iso2`, `Language`.`id` FROM `cities` AS `City` LEFT JOIN `languages` AS `Language` ON (`City`.`language_id` = `Language`.`id`) WHERE `City`.`slug` = 'guatemala-city' AND `City`.`is_approved` = 1 LIMIT 1 | | 1 | 1 | 0 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | City | | ref | slug | slug | 137 | const | 1 | 10.00 | Using where |
| 1 | SIMPLE | Language | | eq_ref | PRIMARY | PRIMARY | 8 | cuponclu_playpen120111.City.language_id | 1 | 100.00 | |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select `cuponclu_playpen120111`.`City`.`language_id` AS `language_id`,`cuponclu_playpen120111`.`Language`.`iso2` AS `iso2`,`cuponclu_playpen120111`.`Language`.`id` AS `id` from `cuponclu_playpen120111`.`cities` `City` left join `cuponclu_playpen120111`.`languages` `Language` on((`cuponclu_playpen120111`.`Language`.`id` = `cuponclu_playpen120111`.`City`.`language_id`)) where ((`cuponclu_playpen120111`.`City`.`is_approved` = 1) and (`cuponclu_playpen120111`.`City`.`slug` = 'guatemala-city')) limit 1 |
|
| 71 | DESCRIBE `email_templates` | | 11 | 11 | 1 |
| 72 | DESCRIBE `survey_questions` | | 3 | 3 | 1 |
| 73 | SELECT `City`.`id`, `City`.`created`, `City`.`modified`, `City`.`country_id`, `City`.`state_id`, `City`.`language_id`, `City`.`name`, `City`.`slug`, `City`.`latitude`, `City`.`longitude`, `City`.`dma_id`, `City`.`county`, `City`.`code`, `City`.`deal_count`, `City`.`active_deal_count`, `City`.`is_approved`, `City`.`fb_user_id`, `City`.`fb_access_token`, `City`.`twitter_username`, `City`.`twitter_password`, `City`.`twitter_access_token`, `City`.`twitter_access_key`, `City`.`twitter_url`, `City`.`facebook_url`, `Attachment`.`id`, `Attachment`.`created`, `Attachment`.`modified`, `Attachment`.`class`, `Attachment`.`foreign_id`, `Attachment`.`filename`, `Attachment`.`dir`, `Attachment`.`mimetype`, `Attachment`.`filesize`, `Attachment`.`height`, `Attachment`.`width`, `Attachment`.`thumb`, `Attachment`.`description` FROM `cities` AS `City` LEFT JOIN `attachments` AS `Attachment` ON (`Attachment`.`foreign_id` = `City`.`id` AND `Attachment`.`class` = 'City') WHERE `City`.`slug` = 'guatemala-city' AND `City`.`is_approved` = 1 LIMIT 1 | | 1 | 1 | 0 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | City | | ref | slug | slug | 137 | const | 1 | 10.00 | Using where |
| 1 | SIMPLE | Attachment | | ref | foreign_id,class | foreign_id | 8 | cuponclu_playpen120111.City.id | 1 | 100.00 | Using where |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select `cuponclu_playpen120111`.`City`.`id` AS `id`,`cuponclu_playpen120111`.`City`.`created` AS `created`,`cuponclu_playpen120111`.`City`.`modified` AS `modified`,`cuponclu_playpen120111`.`City`.`country_id` AS `country_id`,`cuponclu_playpen120111`.`City`.`state_id` AS `state_id`,`cuponclu_playpen120111`.`City`.`language_id` AS `language_id`,`cuponclu_playpen120111`.`City`.`name` AS `name`,`cuponclu_playpen120111`.`City`.`slug` AS `slug`,`cuponclu_playpen120111`.`City`.`latitude` AS `latitude`,`cuponclu_playpen120111`.`City`.`longitude` AS `longitude`,`cuponclu_playpen120111`.`City`.`dma_id` AS `dma_id`,`cuponclu_playpen120111`.`City`.`county` AS `county`,`cuponclu_playpen120111`.`City`.`code` AS `code`,`cuponclu_playpen120111`.`City`.`deal_count` AS `deal_count`,`cuponclu_playpen120111`.`City`.`active_deal_count` AS `active_deal_count`,`cuponclu_playpen120111`.`City`.`is_approved` AS `is_approved`,`cuponclu_playpen120111`.`City`.`fb_user_id` AS `fb_user_id`,`cuponclu_playpen120111`.`City`.`fb_access_token` AS `fb_access_token`,`cuponclu_playpen120111`.`City`.`twitter_username` AS `twitter_username`,`cuponclu_playpen120111`.`City`.`twitter_password` AS `twitter_password`,`cuponclu_playpen120111`.`City`.`twitter_access_token` AS `twitter_access_token`,`cuponclu_playpen120111`.`City`.`twitter_access_key` AS `twitter_access_key`,`cuponclu_playpen120111`.`City`.`twitter_url` AS `twitter_url`,`cuponclu_playpen120111`.`City`.`facebook_url` AS `facebook_url`,`cuponclu_playpen120111`.`Attachment`.`id` AS `id`,`cuponclu_playpen120111`.`Attachment`.`created` AS `created`,`cuponclu_playpen120111`.`Attachment`.`modified` AS `modified`,`cuponclu_playpen120111`.`Attachment`.`class` AS `class`,`cuponclu_playpen120111`.`Attachment`.`foreign_id` AS `foreign_id`,`cuponclu_playpen120111`.`Attachment`.`filename` AS `filename`,`cuponclu_playpen120111`.`Attachment`.`dir` AS `dir`,`cuponclu_playpen120111`.`Attachment`.`mimetype` AS `mimetype`,`cuponclu_playpen120111`.`Attachment`.`filesize` AS `filesize`,`cuponclu_playpen120111`.`Attachment`.`height` AS `height`,`cuponclu_playpen120111`.`Attachment`.`width` AS `width`,`cuponclu_playpen120111`.`Attachment`.`thumb` AS `thumb`,`cuponclu_playpen120111`.`Attachment`.`description` AS `description` from `cuponclu_playpen120111`.`cities` `City` left join `cuponclu_playpen120111`.`attachments` `Attachment` on(((`cuponclu_playpen120111`.`Attachment`.`foreign_id` = `cuponclu_playpen120111`.`City`.`id`) and (`cuponclu_playpen120111`.`Attachment`.`class` = 'City'))) where ((`cuponclu_playpen120111`.`City`.`is_approved` = 1) and (`cuponclu_playpen120111`.`City`.`slug` = 'guatemala-city')) limit 1 |
|
| 74 | DESCRIBE `banned_ips` | | 10 | 10 | 1 |
| 75 | SELECT `BannedIp`.`id`, `BannedIp`.`created`, `BannedIp`.`modified`, `BannedIp`.`address`, `BannedIp`.`range`, `BannedIp`.`referer_url`, `BannedIp`.`reason`, `BannedIp`.`redirect`, `BannedIp`.`thetime`, `BannedIp`.`timespan` FROM `banned_ips` AS `BannedIp` WHERE ((`BannedIp`.`address` = '3628718375') OR (`BannedIp`.`range` = '3628718375') OR (((`BannedIp`.`address` >= '3628718375') AND (`BannedIp`.`range` <= '3628718375'))) OR (((`BannedIp`.`address` <= '3628718375') AND (`BannedIp`.`range` >= '3628718375')))) LIMIT 1 | | 0 | 0 | 0 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | BannedIp | | ALL | address,range | | | | 2 | 85.94 | Using where |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select `cuponclu_playpen120111`.`BannedIp`.`id` AS `id`,`cuponclu_playpen120111`.`BannedIp`.`created` AS `created`,`cuponclu_playpen120111`.`BannedIp`.`modified` AS `modified`,`cuponclu_playpen120111`.`BannedIp`.`address` AS `address`,`cuponclu_playpen120111`.`BannedIp`.`range` AS `range`,`cuponclu_playpen120111`.`BannedIp`.`referer_url` AS `referer_url`,`cuponclu_playpen120111`.`BannedIp`.`reason` AS `reason`,`cuponclu_playpen120111`.`BannedIp`.`redirect` AS `redirect`,`cuponclu_playpen120111`.`BannedIp`.`thetime` AS `thetime`,`cuponclu_playpen120111`.`BannedIp`.`timespan` AS `timespan` from `cuponclu_playpen120111`.`banned_ips` `BannedIp` where ((`cuponclu_playpen120111`.`BannedIp`.`address` = '3628718375') or (`cuponclu_playpen120111`.`BannedIp`.`range` = '3628718375') or ((`cuponclu_playpen120111`.`BannedIp`.`address` >= '3628718375') and (`cuponclu_playpen120111`.`BannedIp`.`range` <= '3628718375')) or ((`cuponclu_playpen120111`.`BannedIp`.`address` <= '3628718375') and (`cuponclu_playpen120111`.`BannedIp`.`range` >= '3628718375'))) limit 1 |
|
| 76 | SELECT `DealCategory`.`id`, `DealCategory`.`name` FROM `deal_categories` AS `DealCategory` WHERE 1 = 1 | | 22 | 22 | 0 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | DealCategory | | ALL | | | | | 22 | 100.00 | |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select `cuponclu_playpen120111`.`DealCategory`.`id` AS `id`,`cuponclu_playpen120111`.`DealCategory`.`name` AS `name` from `cuponclu_playpen120111`.`deal_categories` `DealCategory` |
|
| 77 | SELECT `Deal`.`id`, `Deal`.`created`, `Deal`.`modified`, `Deal`.`user_id`, `Deal`.`name`, `Deal`.`short_name`, `Deal`.`coupon_name`, `Deal`.`display_neighborhoodname`, `Deal`.`slug`, `Deal`.`bitly_short_url`, `Deal`.`description`, `Deal`.`private_note`, `Deal`.`original_price`, `Deal`.`discounted_price`, `Deal`.`start_date`, `Deal`.`end_date`, `Deal`.`sort_order`, `Deal`.`discount_percentage`, `Deal`.`discount_amount`, `Deal`.`savings`, `Deal`.`min_limit`, `Deal`.`max_limit`, `Deal`.`city_id`, `Deal`.`display_city_id`, `Deal`.`company_id`, `Deal`.`review`, `Deal`.`deal_user_count`, `Deal`.`payment_failed_count`, `Deal`.`buy_min_quantity_per_user`, `Deal`.`buy_max_quantity_per_user`, `Deal`.`deal_tipped_time`, `Deal`.`coupon_expiry_date`, `Deal`.`coupon_condition`, `Deal`.`coupon_highlights`, `Deal`.`comment`, `Deal`.`is_coupon_mail_sent`, `Deal`.`is_subscription_mail_sent`, `Deal`.`is_side_deal`, `Deal`.`deal_status_id`, `Deal`.`bonus_amount`, `Deal`.`commission_percentage`, `Deal`.`commission_percent_unused`, `Deal`.`vat_percent`, `Deal`.`payment1_amt`, `Deal`.`payment1_date`, `Deal`.`payment1_check_no`, `Deal`.`payment1_bank`, `Deal`.`payment1_comm`, `Deal`.`payment1_vat`, `Deal`.`payment1_info`, `Deal`.`payment1_comments`, `Deal`.`payment2_amt`, `Deal`.`payment2_date`, `Deal`.`payment2_check_no`, `Deal`.`payment2_bank`, `Deal`.`payment2_comm`, `Deal`.`payment2_vat`, `Deal`.`payment2_info`, `Deal`.`payment2_comments`, `Deal`.`payment3_amt`, `Deal`.`payment3_date`, `Deal`.`payment3_check_no`, `Deal`.`payment3_bank`, `Deal`.`payment3_comm`, `Deal`.`payment3_vat`, `Deal`.`payment3_info`, `Deal`.`payment3_comments`, `Deal`.`payment4_amt`, `Deal`.`payment4_date`, `Deal`.`payment4_check_no`, `Deal`.`payment4_bank`, `Deal`.`payment4_comm`, `Deal`.`payment4_vat`, `Deal`.`payment4_info`, `Deal`.`payment4_comments`, `Deal`.`first_payment_percent`, `Deal`.`added_coupons`, `Deal`.`total_commission_amount`, `Deal`.`total_purchased_amount`, `Deal`.`net_profit`, `Deal`.`meta_keywords`, `Deal`.`meta_description`, `Deal`.`bitly_short_url_subdomain`, `Deal`.`bitly_short_url_prefix`, `Deal`.`certainly`, `Deal`.`probably`, `Deal`.`unlikely_satisfied`, `Deal`.`unlikely_unsatisfied`, `Deal`.`survey_happy`, `Deal`.`survey_fair`, `Deal`.`survey_sad`, `Deal`.`salesman`, `Deal`.`zone`, `Deal`.`industry`, `Deal`.`category_id`, `Deal`.`sub_category_id`, `Deal`.`gender`, `Deal`.`neighborhood_id`, `Deal`.`sales_projection`, `Deal`.`facebook_description`, `Deal`.`facebook_title`, `User`.`user_type_id`, `User`.`username`, `User`.`id`, `User`.`email`, `User`.`password`, `City`.`id`, `City`.`name`, `City`.`slug`, `Company`.`name`, `Company`.`slug`, `Company`.`id`, `Company`.`user_id`, `Company`.`url`, `Company`.`zip`, `Company`.`address1`, `Company`.`address2`, `Company`.`city_id`, `Company`.`latitude`, `Company`.`longitude`, `Company`.`is_company_profile_enabled`, `Company`.`is_online_account`, `Company`.`map_zoom_level`, `Company`.`survey_responses`, `Company`.`half_stars`, `Company`.`percent_to_return`, `Company`.`state_id`, `Company`.`country_id`, `Attachment`.`id`, `Attachment`.`dir`, `Attachment`.`filename`, `Attachment`.`width`, `Attachment`.`height`, `Fbpicture`.`id`, `Fbpicture`.`dir`, `Fbpicture`.`filename`, `Fbpicture`.`width`, `Fbpicture`.`height` FROM `deals` AS `Deal` LEFT JOIN `users` AS `User` ON (`Deal`.`user_id` = `User`.`id`) LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `companies` AS `Company` ON (`Deal`.`company_id` = `Company`.`id`) LEFT JOIN `attachments` AS `Attachment` ON (`Attachment`.`foreign_id` = `Deal`.`id` AND `Attachment`.`class` = 'Deal') LEFT JOIN `fbpictures` AS `Fbpicture` ON (`Fbpicture`.`foreign_id` = `Deal`.`id` AND `Fbpicture`.`class` = 'Deal') WHERE `Deal`.`slug` = '¡paga-q75-en-lugar-de-q150-po' LIMIT 1 | | 1 | 1 | 1 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | Deal | | ref | slug | slug | 767 | const | 1 | 100.00 | |
| 1 | SIMPLE | User | | eq_ref | PRIMARY | PRIMARY | 8 | cuponclu_playpen120111.Deal.user_id | 1 | 100.00 | Using index condition |
| 1 | SIMPLE | City | | eq_ref | PRIMARY | PRIMARY | 8 | cuponclu_playpen120111.Deal.city_id | 1 | 100.00 | |
| 1 | SIMPLE | Company | | eq_ref | PRIMARY | PRIMARY | 8 | cuponclu_playpen120111.Deal.company_id | 1 | 100.00 | |
| 1 | SIMPLE | Attachment | | ref | foreign_id,class | foreign_id | 8 | cuponclu_playpen120111.Deal.id | 1 | 100.00 | Using where |
| 1 | SIMPLE | Fbpicture | | ref | foreign_id,class | foreign_id | 8 | cuponclu_playpen120111.Deal.id | 1 | 100.00 | Using where |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select `cuponclu_playpen120111`.`Deal`.`id` AS `id`,`cuponclu_playpen120111`.`Deal`.`created` AS `created`,`cuponclu_playpen120111`.`Deal`.`modified` AS `modified`,`cuponclu_playpen120111`.`Deal`.`user_id` AS `user_id`,`cuponclu_playpen120111`.`Deal`.`name` AS `name`,`cuponclu_playpen120111`.`Deal`.`short_name` AS `short_name`,`cuponclu_playpen120111`.`Deal`.`coupon_name` AS `coupon_name`,`cuponclu_playpen120111`.`Deal`.`display_neighborhoodname` AS `display_neighborhoodname`,`cuponclu_playpen120111`.`Deal`.`slug` AS `slug`,`cuponclu_playpen120111`.`Deal`.`bitly_short_url` AS `bitly_short_url`,`cuponclu_playpen120111`.`Deal`.`description` AS `description`,`cuponclu_playpen120111`.`Deal`.`private_note` AS `private_note`,`cuponclu_playpen120111`.`Deal`.`original_price` AS `original_price`,`cuponclu_playpen120111`.`Deal`.`discounted_price` AS `discounted_price`,`cuponclu_playpen120111`.`Deal`.`start_date` AS `start_date`,`cuponclu_playpen120111`.`Deal`.`end_date` AS `end_date`,`cuponclu_playpen120111`.`Deal`.`sort_order` AS `sort_order`,`cuponclu_playpen120111`.`Deal`.`discount_percentage` AS `discount_percentage`,`cuponclu_playpen120111`.`Deal`.`discount_amount` AS `discount_amount`,`cuponclu_playpen120111`.`Deal`.`savings` AS `savings`,`cuponclu_playpen120111`.`Deal`.`min_limit` AS `min_limit`,`cuponclu_playpen120111`.`Deal`.`max_limit` AS `max_limit`,`cuponclu_playpen120111`.`Deal`.`city_id` AS `city_id`,`cuponclu_playpen120111`.`Deal`.`display_city_id` AS `display_city_id`,`cuponclu_playpen120111`.`Deal`.`company_id` AS `company_id`,`cuponclu_playpen120111`.`Deal`.`review` AS `review`,`cuponclu_playpen120111`.`Deal`.`deal_user_count` AS `deal_user_count`,`cuponclu_playpen120111`.`Deal`.`payment_failed_count` AS `payment_failed_count`,`cuponclu_playpen120111`.`Deal`.`buy_min_quantity_per_user` AS `buy_min_quantity_per_user`,`cuponclu_playpen120111`.`Deal`.`buy_max_quantity_per_user` AS `buy_max_quantity_per_user`,`cuponclu_playpen120111`.`Deal`.`deal_tipped_time` AS `deal_tipped_time`,`cuponclu_playpen120111`.`Deal`.`coupon_expiry_date` AS `coupon_expiry_date`,`cuponclu_playpen120111`.`Deal`.`coupon_condition` AS `coupon_condition`,`cuponclu_playpen120111`.`Deal`.`coupon_highlights` AS `coupon_highlights`,`cuponclu_playpen120111`.`Deal`.`comment` AS `comment`,`cuponclu_playpen120111`.`Deal`.`is_coupon_mail_sent` AS `is_coupon_mail_sent`,`cuponclu_playpen120111`.`Deal`.`is_subscription_mail_sent` AS `is_subscription_mail_sent`,`cuponclu_playpen120111`.`Deal`.`is_side_deal` AS `is_side_deal`,`cuponclu_playpen120111`.`Deal`.`deal_status_id` AS `deal_status_id`,`cuponclu_playpen120111`.`Deal`.`bonus_amount` AS `bonus_amount`,`cuponclu_playpen120111`.`Deal`.`commission_percentage` AS `commission_percentage`,`cuponclu_playpen120111`.`Deal`.`commission_percent_unused` AS `commission_percent_unused`,`cuponclu_playpen120111`.`Deal`.`vat_percent` AS `vat_percent`,`cuponclu_playpen120111`.`Deal`.`payment1_amt` AS `payment1_amt`,`cuponclu_playpen120111`.`Deal`.`payment1_date` AS `payment1_date`,`cuponclu_playpen120111`.`Deal`.`payment1_check_no` AS `payment1_check_no`,`cuponclu_playpen120111`.`Deal`.`payment1_bank` AS `payment1_bank`,`cuponclu_playpen120111`.`Deal`.`payment1_comm` AS `payment1_comm`,`cuponclu_playpen120111`.`Deal`.`payment1_vat` AS `payment1_vat`,`cuponclu_playpen120111`.`Deal`.`payment1_info` AS `payment1_info`,`cuponclu_playpen120111`.`Deal`.`payment1_comments` AS `payment1_comments`,`cuponclu_playpen120111`.`Deal`.`payment2_amt` AS `payment2_amt`,`cuponclu_playpen120111`.`Deal`.`payment2_date` AS `payment2_date`,`cuponclu_playpen120111`.`Deal`.`payment2_check_no` AS `payment2_check_no`,`cuponclu_playpen120111`.`Deal`.`payment2_bank` AS `payment2_bank`,`cuponclu_playpen120111`.`Deal`.`payment2_comm` AS `payment2_comm`,`cuponclu_playpen120111`.`Deal`.`payment2_vat` AS `payment2_vat`,`cuponclu_playpen120111`.`Deal`.`payment2_info` AS `payment2_info`,`cuponclu_playpen120111`.`Deal`.`payment2_comments` AS `payment2_comments`,`cuponclu_playpen120111`.`Deal`.`payment3_amt` AS `payment3_amt`,`cuponclu_playpen120111`.`Deal`.`payment3_date` AS `payment3_date`,`cuponclu_playpen120111`.`Deal`.`payment3_check_no` AS `payment3_check_no`,`cuponclu_playpen120111`.`Deal`.`payment3_bank` AS `payment3_bank`,`cuponclu_playpen120111`.`Deal`.`payment3_comm` AS `payment3_comm`,`cuponclu_playpen120111`.`Deal`.`payment3_vat` AS `payment3_vat`,`cuponclu_playpen120111`.`Deal`.`payment3_info` AS `payment3_info`,`cuponclu_playpen120111`.`Deal`.`payment3_comments` AS `payment3_comments`,`cuponclu_playpen120111`.`Deal`.`payment4_amt` AS `payment4_amt`,`cuponclu_playpen120111`.`Deal`.`payment4_date` AS `payment4_date`,`cuponclu_playpen120111`.`Deal`.`payment4_check_no` AS `payment4_check_no`,`cuponclu_playpen120111`.`Deal`.`payment4_bank` AS `payment4_bank`,`cuponclu_playpen120111`.`Deal`.`payment4_comm` AS `payment4_comm`,`cuponclu_playpen120111`.`Deal`.`payment4_vat` AS `payment4_vat`,`cuponclu_playpen120111`.`Deal`.`payment4_info` AS `payment4_info`,`cuponclu_playpen120111`.`Deal`.`payment4_comments` AS `payment4_comments`,`cuponclu_playpen120111`.`Deal`.`first_payment_percent` AS `first_payment_percent`,`cuponclu_playpen120111`.`Deal`.`added_coupons` AS `added_coupons`,`cuponclu_playpen120111`.`Deal`.`total_commission_amount` AS `total_commission_amount`,`cuponclu_playpen120111`.`Deal`.`total_purchased_amount` AS `total_purchased_amount`,`cuponclu_playpen120111`.`Deal`.`net_profit` AS `net_profit`,`cuponclu_playpen120111`.`Deal`.`meta_keywords` AS `meta_keywords`,`cuponclu_playpen120111`.`Deal`.`meta_description` AS `meta_description`,`cuponclu_playpen120111`.`Deal`.`bitly_short_url_subdomain` AS `bitly_short_url_subdomain`,`cuponclu_playpen120111`.`Deal`.`bitly_short_url_prefix` AS `bitly_short_url_prefix`,`cuponclu_playpen120111`.`Deal`.`certainly` AS `certainly`,`cuponclu_playpen120111`.`Deal`.`probably` AS `probably`,`cuponclu_playpen120111`.`Deal`.`unlikely_satisfied` AS `unlikely_satisfied`,`cuponclu_playpen120111`.`Deal`.`unlikely_unsatisfied` AS `unlikely_unsatisfied`,`cuponclu_playpen120111`.`Deal`.`survey_happy` AS `survey_happy`,`cuponclu_playpen120111`.`Deal`.`survey_fair` AS `survey_fair`,`cuponclu_playpen120111`.`Deal`.`survey_sad` AS `survey_sad`,`cuponclu_playpen120111`.`Deal`.`salesman` AS `salesman`,`cuponclu_playpen120111`.`Deal`.`zone` AS `zone`,`cuponclu_playpen120111`.`Deal`.`industry` AS `industry`,`cuponclu_playpen120111`.`Deal`.`category_id` AS `category_id`,`cuponclu_playpen120111`.`Deal`.`sub_category_id` AS `sub_category_id`,`cuponclu_playpen120111`.`Deal`.`gender` AS `gender`,`cuponclu_playpen120111`.`Deal`.`neighborhood_id` AS `neighborhood_id`,`cuponclu_playpen120111`.`Deal`.`sales_projection` AS `sales_projection`,`cuponclu_playpen120111`.`Deal`.`facebook_description` AS `facebook_description`,`cuponclu_playpen120111`.`Deal`.`facebook_title` AS `facebook_title`,`cuponclu_playpen120111`.`User`.`user_type_id` AS `user_type_id`,`cuponclu_playpen120111`.`User`.`username` AS `username`,`cuponclu_playpen120111`.`User`.`id` AS `id`,`cuponclu_playpen120111`.`User`.`email` AS `email`,`cuponclu_playpen120111`.`User`.`password` AS `password`,`cuponclu_playpen120111`.`City`.`id` AS `id`,`cuponclu_playpen120111`.`City`.`name` AS `name`,`cuponclu_playpen120111`.`City`.`slug` AS `slug`,`cuponclu_playpen120111`.`Company`.`name` AS `name`,`cuponclu_playpen120111`.`Company`.`slug` AS `slug`,`cuponclu_playpen120111`.`Company`.`id` AS `id`,`cuponclu_playpen120111`.`Company`.`user_id` AS `user_id`,`cuponclu_playpen120111`.`Company`.`url` AS `url`,`cuponclu_playpen120111`.`Company`.`zip` AS `zip`,`cuponclu_playpen120111`.`Company`.`address1` AS `address1`,`cuponclu_playpen120111`.`Company`.`address2` AS `address2`,`cuponclu_playpen120111`.`Company`.`city_id` AS `city_id`,`cuponclu_playpen120111`.`Company`.`latitude` AS `latitude`,`cuponclu_playpen120111`.`Company`.`longitude` AS `longitude`,`cuponclu_playpen120111`.`Company`.`is_company_profile_enabled` AS `is_company_profile_enabled`,`cuponclu_playpen120111`.`Company`.`is_online_account` AS `is_online_account`,`cuponclu_playpen120111`.`Company`.`map_zoom_level` AS `map_zoom_level`,`cuponclu_playpen120111`.`Company`.`survey_responses` AS `survey_responses`,`cuponclu_playpen120111`.`Company`.`half_stars` AS `half_stars`,`cuponclu_playpen120111`.`Company`.`percent_to_return` AS `percent_to_return`,`cuponclu_playpen120111`.`Company`.`state_id` AS `state_id`,`cuponclu_playpen120111`.`Company`.`country_id` AS `country_id`,`cuponclu_playpen120111`.`Attachment`.`id` AS `id`,`cuponclu_playpen120111`.`Attachment`.`dir` AS `dir`,`cuponclu_playpen120111`.`Attachment`.`filename` AS `filename`,`cuponclu_playpen120111`.`Attachment`.`width` AS `width`,`cuponclu_playpen120111`.`Attachment`.`height` AS `height`,`cuponclu_playpen120111`.`Fbpicture`.`id` AS `id`,`cuponclu_playpen120111`.`Fbpicture`.`dir` AS `dir`,`cuponclu_playpen120111`.`Fbpicture`.`filename` AS `filename`,`cuponclu_playpen120111`.`Fbpicture`.`width` AS `width`,`cuponclu_playpen120111`.`Fbpicture`.`height` AS `height` from `cuponclu_playpen120111`.`deals` `Deal` left join `cuponclu_playpen120111`.`users` `User` on((`cuponclu_playpen120111`.`Deal`.`user_id` = `cuponclu_playpen120111`.`User`.`id`)) left join `cuponclu_playpen120111`.`cities` `City` on((`cuponclu_playpen120111`.`City`.`id` = `cuponclu_playpen120111`.`Deal`.`city_id`)) left join `cuponclu_playpen120111`.`companies` `Company` on((`cuponclu_playpen120111`.`Company`.`id` = `cuponclu_playpen120111`.`Deal`.`company_id`)) left join `cuponclu_playpen120111`.`attachments` `Attachment` on(((`cuponclu_playpen120111`.`Attachment`.`foreign_id` = `cuponclu_playpen120111`.`Deal`.`id`) and (`cuponclu_playpen120111`.`Attachment`.`class` = 'Deal'))) left join `cuponclu_playpen120111`.`fbpictures` `Fbpicture` on(((`cuponclu_playpen120111`.`Fbpicture`.`foreign_id` = `cuponclu_playpen120111`.`Deal`.`id`) and (`cuponclu_playpen120111`.`Fbpicture`.`class` = 'Deal'))) where (`cuponclu_playpen120111`.`Deal`.`slug` = '¡paga-q75-en-lugar-de-q150-po') limit 1 |
|
| 78 | SELECT `User`.`user_type_id`, `User`.`username`, `User`.`id`, `User`.`email`, `User`.`password` FROM `users` AS `User` WHERE `User`.`id` = 2827 | | 1 | 1 | 0 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | User | | const | PRIMARY | PRIMARY | 8 | const | 1 | 100.00 | |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select '3' AS `user_type_id`,'granturismoSV' AS `username`,'2827' AS `id`,'j.montoya@cuponclub.net' AS `email`,'6c1d6a5262f374b62ed3845a220c80d694bcf024' AS `password` from `cuponclu_playpen120111`.`users` `User` where true |
|
| 79 | SELECT `City`.`id`, `City`.`name`, `City`.`slug` FROM `cities` AS `City` WHERE `City`.`id` = 42563 | | 1 | 1 | 0 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | City | | const | PRIMARY | PRIMARY | 8 | const | 1 | 100.00 | |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select '42563' AS `id`,'Guatemala' AS `name`,'guatemala-city' AS `slug` from `cuponclu_playpen120111`.`cities` `City` where true |
|
| 80 | SELECT `Company`.`name`, `Company`.`slug`, `Company`.`id`, `Company`.`user_id`, `Company`.`url`, `Company`.`zip`, `Company`.`address1`, `Company`.`address2`, `Company`.`city_id`, `Company`.`latitude`, `Company`.`longitude`, `Company`.`is_company_profile_enabled`, `Company`.`is_online_account`, `Company`.`map_zoom_level`, `Company`.`survey_responses`, `Company`.`half_stars`, `Company`.`percent_to_return`, `Company`.`state_id`, `Company`.`country_id` FROM `companies` AS `Company` WHERE `Company`.`id` = 1266 | | 1 | 1 | 0 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | Company | | const | PRIMARY | PRIMARY | 8 | const | 1 | 100.00 | |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select 'Alquimia Centro de Estética y Salud Integral' AS `name`,'alquimia-centro-de-estética-y-salud-integral' AS `slug`,'1266' AS `id`,'171570' AS `user_id`,'' AS `url`,'01010' AS `zip`,'6 Av. 11-77 Zona 10 Ed. Punto Diez.' AS `address1`,'' AS `address2`,'42563' AS `city_id`,'14.601305' AS `latitude`,'-90.510803' AS `longitude`,'0' AS `is_company_profile_enabled`,'1' AS `is_online_account`,'17' AS `map_zoom_level`,'0' AS `survey_responses`,'0' AS `half_stars`,'0' AS `percent_to_return`,'109' AS `state_id`,'97' AS `country_id` from `cuponclu_playpen120111`.`companies` `Company` where true |
|
| 81 | SELECT `City`.`id`, `City`.`name`, `City`.`slug` FROM `cities` AS `City` WHERE `City`.`id` = 42563 | | 1 | 1 | 0 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | City | | const | PRIMARY | PRIMARY | 8 | const | 1 | 100.00 | |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select '42563' AS `id`,'Guatemala' AS `name`,'guatemala-city' AS `slug` from `cuponclu_playpen120111`.`cities` `City` where true |
|
| 82 | SELECT `State`.`id`, `State`.`name` FROM `states` AS `State` WHERE `State`.`id` = 109 | | 1 | 1 | 0 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | State | | const | PRIMARY | PRIMARY | 8 | const | 1 | 100.00 | |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select '109' AS `id`,'Guatemala' AS `name` from `cuponclu_playpen120111`.`states` `State` where true |
|
| 83 | SELECT `Country`.`id`, `Country`.`name`, `Country`.`slug` FROM `countries` AS `Country` WHERE `Country`.`id` = 97 | | 1 | 1 | 0 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | Country | | const | PRIMARY | PRIMARY | 8 | const | 1 | 100.00 | |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select '97' AS `id`,'Guatemala' AS `name`,'guatemala' AS `slug` from `cuponclu_playpen120111`.`countries` `Country` where true |
|
| 84 | SELECT `CompanyAddress`.`id`, `CompanyAddress`.`created`, `CompanyAddress`.`modified`, `CompanyAddress`.`address1`, `CompanyAddress`.`address2`, `CompanyAddress`.`company_id`, `CompanyAddress`.`city_id`, `CompanyAddress`.`state_id`, `CompanyAddress`.`country_id`, `CompanyAddress`.`phone`, `CompanyAddress`.`zip`, `CompanyAddress`.`url`, `CompanyAddress`.`latitude`, `CompanyAddress`.`longitude` FROM `company_addresses` AS `CompanyAddress` WHERE `CompanyAddress`.`company_id` = (1266) LIMIT 5 | | 0 | 0 | 0 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | | | | | | | | | | Impossible WHERE noticed after reading const tables |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select '2' AS `id`,'2011-11-07 23:50:19' AS `created`,'2011-11-07 23:50:19' AS `modified`,'Col. Escalon entre la 85 y 87ave. Norte No. 4436.' AS `address1`,'' AS `address2`,'246' AS `company_id`,'42553' AS `city_id`,'102' AS `state_id`,'69' AS `country_id`,'' AS `phone`,NULL AS `zip`,'' AS `url`,NULL AS `latitude`,NULL AS `longitude` from dual where false limit 5 |
|
| 85 | SELECT `Attachment`.`id`, `Attachment`.`dir`, `Attachment`.`filename`, `Attachment`.`width`, `Attachment`.`height` FROM `attachments` AS `Attachment` WHERE `Attachment`.`foreign_id` = 6804 AND `Attachment`.`class` = 'Deal' | | 1 | 1 | 0 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | Attachment | | ref | foreign_id,class | foreign_id | 8 | const | 2 | 61.23 | Using where |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select `cuponclu_playpen120111`.`Attachment`.`id` AS `id`,`cuponclu_playpen120111`.`Attachment`.`dir` AS `dir`,`cuponclu_playpen120111`.`Attachment`.`filename` AS `filename`,`cuponclu_playpen120111`.`Attachment`.`width` AS `width`,`cuponclu_playpen120111`.`Attachment`.`height` AS `height` from `cuponclu_playpen120111`.`attachments` `Attachment` where ((`cuponclu_playpen120111`.`Attachment`.`foreign_id` = 6804) and (`cuponclu_playpen120111`.`Attachment`.`class` = 'Deal')) |
|
| 86 | SELECT `Fbpicture`.`id`, `Fbpicture`.`dir`, `Fbpicture`.`filename`, `Fbpicture`.`width`, `Fbpicture`.`height` FROM `fbpictures` AS `Fbpicture` WHERE `Fbpicture`.`foreign_id` = 6804 AND `Fbpicture`.`class` = 'Deal' | | 0 | 0 | 0 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | Fbpicture | | ref | foreign_id,class | foreign_id | 8 | const | 1 | 80.00 | Using where |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select `cuponclu_playpen120111`.`Fbpicture`.`id` AS `id`,`cuponclu_playpen120111`.`Fbpicture`.`dir` AS `dir`,`cuponclu_playpen120111`.`Fbpicture`.`filename` AS `filename`,`cuponclu_playpen120111`.`Fbpicture`.`width` AS `width`,`cuponclu_playpen120111`.`Fbpicture`.`height` AS `height` from `cuponclu_playpen120111`.`fbpictures` `Fbpicture` where ((`cuponclu_playpen120111`.`Fbpicture`.`foreign_id` = 6804) and (`cuponclu_playpen120111`.`Fbpicture`.`class` = 'Deal')) |
|
| 87 | SELECT `Picture`.`id`, `Picture`.`dir`, `Picture`.`filename`, `Picture`.`width`, `Picture`.`height`, `Picture`.`foreign_id` FROM `pictures` AS `Picture` WHERE `Picture`.`class` = 'Deal' AND `Picture`.`foreign_id` = (6804) ORDER BY `Picture`.`id` ASC | | 0 | 0 | 0 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | Picture | | ALL | | | | | 27 | 3.70 | Using where; Using filesort |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select `cuponclu_playpen120111`.`Picture`.`id` AS `id`,`cuponclu_playpen120111`.`Picture`.`dir` AS `dir`,`cuponclu_playpen120111`.`Picture`.`filename` AS `filename`,`cuponclu_playpen120111`.`Picture`.`width` AS `width`,`cuponclu_playpen120111`.`Picture`.`height` AS `height`,`cuponclu_playpen120111`.`Picture`.`foreign_id` AS `foreign_id` from `cuponclu_playpen120111`.`pictures` `Picture` where ((`cuponclu_playpen120111`.`Picture`.`foreign_id` = 6804) and (`cuponclu_playpen120111`.`Picture`.`class` = 'Deal')) order by `cuponclu_playpen120111`.`Picture`.`id` |
|
| 88 | SELECT `Deal`.`id`, `Deal`.`created`, `Deal`.`modified`, `Deal`.`user_id`, `Deal`.`name`, `Deal`.`short_name`, `Deal`.`coupon_name`, `Deal`.`display_neighborhoodname`, `Deal`.`slug`, `Deal`.`bitly_short_url`, `Deal`.`description`, `Deal`.`private_note`, `Deal`.`original_price`, `Deal`.`discounted_price`, `Deal`.`start_date`, `Deal`.`end_date`, `Deal`.`sort_order`, `Deal`.`discount_percentage`, `Deal`.`discount_amount`, `Deal`.`savings`, `Deal`.`min_limit`, `Deal`.`max_limit`, `Deal`.`city_id`, `Deal`.`display_city_id`, `Deal`.`company_id`, `Deal`.`review`, `Deal`.`deal_user_count`, `Deal`.`payment_failed_count`, `Deal`.`buy_min_quantity_per_user`, `Deal`.`buy_max_quantity_per_user`, `Deal`.`deal_tipped_time`, `Deal`.`coupon_expiry_date`, `Deal`.`coupon_condition`, `Deal`.`coupon_highlights`, `Deal`.`comment`, `Deal`.`is_coupon_mail_sent`, `Deal`.`is_subscription_mail_sent`, `Deal`.`is_side_deal`, `Deal`.`deal_status_id`, `Deal`.`bonus_amount`, `Deal`.`commission_percentage`, `Deal`.`commission_percent_unused`, `Deal`.`vat_percent`, `Deal`.`payment1_amt`, `Deal`.`payment1_date`, `Deal`.`payment1_check_no`, `Deal`.`payment1_bank`, `Deal`.`payment1_comm`, `Deal`.`payment1_vat`, `Deal`.`payment1_info`, `Deal`.`payment1_comments`, `Deal`.`payment2_amt`, `Deal`.`payment2_date`, `Deal`.`payment2_check_no`, `Deal`.`payment2_bank`, `Deal`.`payment2_comm`, `Deal`.`payment2_vat`, `Deal`.`payment2_info`, `Deal`.`payment2_comments`, `Deal`.`payment3_amt`, `Deal`.`payment3_date`, `Deal`.`payment3_check_no`, `Deal`.`payment3_bank`, `Deal`.`payment3_comm`, `Deal`.`payment3_vat`, `Deal`.`payment3_info`, `Deal`.`payment3_comments`, `Deal`.`payment4_amt`, `Deal`.`payment4_date`, `Deal`.`payment4_check_no`, `Deal`.`payment4_bank`, `Deal`.`payment4_comm`, `Deal`.`payment4_vat`, `Deal`.`payment4_info`, `Deal`.`payment4_comments`, `Deal`.`first_payment_percent`, `Deal`.`added_coupons`, `Deal`.`total_commission_amount`, `Deal`.`total_purchased_amount`, `Deal`.`net_profit`, `Deal`.`meta_keywords`, `Deal`.`meta_description`, `Deal`.`bitly_short_url_subdomain`, `Deal`.`bitly_short_url_prefix`, `Deal`.`certainly`, `Deal`.`probably`, `Deal`.`unlikely_satisfied`, `Deal`.`unlikely_unsatisfied`, `Deal`.`survey_happy`, `Deal`.`survey_fair`, `Deal`.`survey_sad`, `Deal`.`salesman`, `Deal`.`zone`, `Deal`.`industry`, `Deal`.`category_id`, `Deal`.`sub_category_id`, `Deal`.`gender`, `Deal`.`neighborhood_id`, `Deal`.`sales_projection`, `Deal`.`facebook_description`, `Deal`.`facebook_title`, `City`.`id`, `City`.`created`, `City`.`modified`, `City`.`country_id`, `City`.`state_id`, `City`.`language_id`, `City`.`name`, `City`.`slug`, `City`.`latitude`, `City`.`longitude`, `City`.`dma_id`, `City`.`county`, `City`.`code`, `City`.`deal_count`, `City`.`active_deal_count`, `City`.`is_approved`, `City`.`fb_user_id`, `City`.`fb_access_token`, `City`.`twitter_username`, `City`.`twitter_password`, `City`.`twitter_access_token`, `City`.`twitter_access_key`, `City`.`twitter_url`, `City`.`facebook_url`, `Attachment`.`id`, `Attachment`.`dir`, `Attachment`.`filename`, `Attachment`.`width`, `Attachment`.`height`, `Fbpicture`.`id`, `Fbpicture`.`dir`, `Fbpicture`.`filename`, `Fbpicture`.`width`, `Fbpicture`.`height` FROM `deals` AS `Deal` LEFT JOIN `cities` AS `City` ON (`Deal`.`city_id` = `City`.`id`) LEFT JOIN `attachments` AS `Attachment` ON (`Attachment`.`foreign_id` = `Deal`.`id` AND `Attachment`.`class` = 'Deal') LEFT JOIN `fbpictures` AS `Fbpicture` ON (`Fbpicture`.`foreign_id` = `Deal`.`id` AND `Fbpicture`.`class` = 'Deal') WHERE ((`Deal`.`deal_status_id` IN (2, 5)) AND (`Deal`.`slug` != '¡paga-q75-en-lugar-de-q150-po') AND (`Deal`.`city_id` = 42563)) ORDER BY `Deal`.`sort_order` asc LIMIT 68 | | 10 | 10 | 1 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | Deal | | ref | city_id,slug,deal_status_id | city_id | 8 | const | 62 | 21.21 | Using where; Using filesort |
| 1 | SIMPLE | City | | const | PRIMARY | PRIMARY | 8 | const | 1 | 100.00 | |
| 1 | SIMPLE | Attachment | | ref | foreign_id,class | foreign_id | 8 | cuponclu_playpen120111.Deal.id | 1 | 100.00 | Using where |
| 1 | SIMPLE | Fbpicture | | ref | foreign_id,class | foreign_id | 8 | cuponclu_playpen120111.Deal.id | 1 | 100.00 | Using where |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select `cuponclu_playpen120111`.`Deal`.`id` AS `id`,`cuponclu_playpen120111`.`Deal`.`created` AS `created`,`cuponclu_playpen120111`.`Deal`.`modified` AS `modified`,`cuponclu_playpen120111`.`Deal`.`user_id` AS `user_id`,`cuponclu_playpen120111`.`Deal`.`name` AS `name`,`cuponclu_playpen120111`.`Deal`.`short_name` AS `short_name`,`cuponclu_playpen120111`.`Deal`.`coupon_name` AS `coupon_name`,`cuponclu_playpen120111`.`Deal`.`display_neighborhoodname` AS `display_neighborhoodname`,`cuponclu_playpen120111`.`Deal`.`slug` AS `slug`,`cuponclu_playpen120111`.`Deal`.`bitly_short_url` AS `bitly_short_url`,`cuponclu_playpen120111`.`Deal`.`description` AS `description`,`cuponclu_playpen120111`.`Deal`.`private_note` AS `private_note`,`cuponclu_playpen120111`.`Deal`.`original_price` AS `original_price`,`cuponclu_playpen120111`.`Deal`.`discounted_price` AS `discounted_price`,`cuponclu_playpen120111`.`Deal`.`start_date` AS `start_date`,`cuponclu_playpen120111`.`Deal`.`end_date` AS `end_date`,`cuponclu_playpen120111`.`Deal`.`sort_order` AS `sort_order`,`cuponclu_playpen120111`.`Deal`.`discount_percentage` AS `discount_percentage`,`cuponclu_playpen120111`.`Deal`.`discount_amount` AS `discount_amount`,`cuponclu_playpen120111`.`Deal`.`savings` AS `savings`,`cuponclu_playpen120111`.`Deal`.`min_limit` AS `min_limit`,`cuponclu_playpen120111`.`Deal`.`max_limit` AS `max_limit`,`cuponclu_playpen120111`.`Deal`.`city_id` AS `city_id`,`cuponclu_playpen120111`.`Deal`.`display_city_id` AS `display_city_id`,`cuponclu_playpen120111`.`Deal`.`company_id` AS `company_id`,`cuponclu_playpen120111`.`Deal`.`review` AS `review`,`cuponclu_playpen120111`.`Deal`.`deal_user_count` AS `deal_user_count`,`cuponclu_playpen120111`.`Deal`.`payment_failed_count` AS `payment_failed_count`,`cuponclu_playpen120111`.`Deal`.`buy_min_quantity_per_user` AS `buy_min_quantity_per_user`,`cuponclu_playpen120111`.`Deal`.`buy_max_quantity_per_user` AS `buy_max_quantity_per_user`,`cuponclu_playpen120111`.`Deal`.`deal_tipped_time` AS `deal_tipped_time`,`cuponclu_playpen120111`.`Deal`.`coupon_expiry_date` AS `coupon_expiry_date`,`cuponclu_playpen120111`.`Deal`.`coupon_condition` AS `coupon_condition`,`cuponclu_playpen120111`.`Deal`.`coupon_highlights` AS `coupon_highlights`,`cuponclu_playpen120111`.`Deal`.`comment` AS `comment`,`cuponclu_playpen120111`.`Deal`.`is_coupon_mail_sent` AS `is_coupon_mail_sent`,`cuponclu_playpen120111`.`Deal`.`is_subscription_mail_sent` AS `is_subscription_mail_sent`,`cuponclu_playpen120111`.`Deal`.`is_side_deal` AS `is_side_deal`,`cuponclu_playpen120111`.`Deal`.`deal_status_id` AS `deal_status_id`,`cuponclu_playpen120111`.`Deal`.`bonus_amount` AS `bonus_amount`,`cuponclu_playpen120111`.`Deal`.`commission_percentage` AS `commission_percentage`,`cuponclu_playpen120111`.`Deal`.`commission_percent_unused` AS `commission_percent_unused`,`cuponclu_playpen120111`.`Deal`.`vat_percent` AS `vat_percent`,`cuponclu_playpen120111`.`Deal`.`payment1_amt` AS `payment1_amt`,`cuponclu_playpen120111`.`Deal`.`payment1_date` AS `payment1_date`,`cuponclu_playpen120111`.`Deal`.`payment1_check_no` AS `payment1_check_no`,`cuponclu_playpen120111`.`Deal`.`payment1_bank` AS `payment1_bank`,`cuponclu_playpen120111`.`Deal`.`payment1_comm` AS `payment1_comm`,`cuponclu_playpen120111`.`Deal`.`payment1_vat` AS `payment1_vat`,`cuponclu_playpen120111`.`Deal`.`payment1_info` AS `payment1_info`,`cuponclu_playpen120111`.`Deal`.`payment1_comments` AS `payment1_comments`,`cuponclu_playpen120111`.`Deal`.`payment2_amt` AS `payment2_amt`,`cuponclu_playpen120111`.`Deal`.`payment2_date` AS `payment2_date`,`cuponclu_playpen120111`.`Deal`.`payment2_check_no` AS `payment2_check_no`,`cuponclu_playpen120111`.`Deal`.`payment2_bank` AS `payment2_bank`,`cuponclu_playpen120111`.`Deal`.`payment2_comm` AS `payment2_comm`,`cuponclu_playpen120111`.`Deal`.`payment2_vat` AS `payment2_vat`,`cuponclu_playpen120111`.`Deal`.`payment2_info` AS `payment2_info`,`cuponclu_playpen120111`.`Deal`.`payment2_comments` AS `payment2_comments`,`cuponclu_playpen120111`.`Deal`.`payment3_amt` AS `payment3_amt`,`cuponclu_playpen120111`.`Deal`.`payment3_date` AS `payment3_date`,`cuponclu_playpen120111`.`Deal`.`payment3_check_no` AS `payment3_check_no`,`cuponclu_playpen120111`.`Deal`.`payment3_bank` AS `payment3_bank`,`cuponclu_playpen120111`.`Deal`.`payment3_comm` AS `payment3_comm`,`cuponclu_playpen120111`.`Deal`.`payment3_vat` AS `payment3_vat`,`cuponclu_playpen120111`.`Deal`.`payment3_info` AS `payment3_info`,`cuponclu_playpen120111`.`Deal`.`payment3_comments` AS `payment3_comments`,`cuponclu_playpen120111`.`Deal`.`payment4_amt` AS `payment4_amt`,`cuponclu_playpen120111`.`Deal`.`payment4_date` AS `payment4_date`,`cuponclu_playpen120111`.`Deal`.`payment4_check_no` AS `payment4_check_no`,`cuponclu_playpen120111`.`Deal`.`payment4_bank` AS `payment4_bank`,`cuponclu_playpen120111`.`Deal`.`payment4_comm` AS `payment4_comm`,`cuponclu_playpen120111`.`Deal`.`payment4_vat` AS `payment4_vat`,`cuponclu_playpen120111`.`Deal`.`payment4_info` AS `payment4_info`,`cuponclu_playpen120111`.`Deal`.`payment4_comments` AS `payment4_comments`,`cuponclu_playpen120111`.`Deal`.`first_payment_percent` AS `first_payment_percent`,`cuponclu_playpen120111`.`Deal`.`added_coupons` AS `added_coupons`,`cuponclu_playpen120111`.`Deal`.`total_commission_amount` AS `total_commission_amount`,`cuponclu_playpen120111`.`Deal`.`total_purchased_amount` AS `total_purchased_amount`,`cuponclu_playpen120111`.`Deal`.`net_profit` AS `net_profit`,`cuponclu_playpen120111`.`Deal`.`meta_keywords` AS `meta_keywords`,`cuponclu_playpen120111`.`Deal`.`meta_description` AS `meta_description`,`cuponclu_playpen120111`.`Deal`.`bitly_short_url_subdomain` AS `bitly_short_url_subdomain`,`cuponclu_playpen120111`.`Deal`.`bitly_short_url_prefix` AS `bitly_short_url_prefix`,`cuponclu_playpen120111`.`Deal`.`certainly` AS `certainly`,`cuponclu_playpen120111`.`Deal`.`probably` AS `probably`,`cuponclu_playpen120111`.`Deal`.`unlikely_satisfied` AS `unlikely_satisfied`,`cuponclu_playpen120111`.`Deal`.`unlikely_unsatisfied` AS `unlikely_unsatisfied`,`cuponclu_playpen120111`.`Deal`.`survey_happy` AS `survey_happy`,`cuponclu_playpen120111`.`Deal`.`survey_fair` AS `survey_fair`,`cuponclu_playpen120111`.`Deal`.`survey_sad` AS `survey_sad`,`cuponclu_playpen120111`.`Deal`.`salesman` AS `salesman`,`cuponclu_playpen120111`.`Deal`.`zone` AS `zone`,`cuponclu_playpen120111`.`Deal`.`industry` AS `industry`,`cuponclu_playpen120111`.`Deal`.`category_id` AS `category_id`,`cuponclu_playpen120111`.`Deal`.`sub_category_id` AS `sub_category_id`,`cuponclu_playpen120111`.`Deal`.`gender` AS `gender`,`cuponclu_playpen120111`.`Deal`.`neighborhood_id` AS `neighborhood_id`,`cuponclu_playpen120111`.`Deal`.`sales_projection` AS `sales_projection`,`cuponclu_playpen120111`.`Deal`.`facebook_description` AS `facebook_description`,`cuponclu_playpen120111`.`Deal`.`facebook_title` AS `facebook_title`,`cuponclu_playpen120111`.`City`.`id` AS `id`,`cuponclu_playpen120111`.`City`.`created` AS `created`,`cuponclu_playpen120111`.`City`.`modified` AS `modified`,`cuponclu_playpen120111`.`City`.`country_id` AS `country_id`,`cuponclu_playpen120111`.`City`.`state_id` AS `state_id`,`cuponclu_playpen120111`.`City`.`language_id` AS `language_id`,`cuponclu_playpen120111`.`City`.`name` AS `name`,`cuponclu_playpen120111`.`City`.`slug` AS `slug`,`cuponclu_playpen120111`.`City`.`latitude` AS `latitude`,`cuponclu_playpen120111`.`City`.`longitude` AS `longitude`,`cuponclu_playpen120111`.`City`.`dma_id` AS `dma_id`,`cuponclu_playpen120111`.`City`.`county` AS `county`,`cuponclu_playpen120111`.`City`.`code` AS `code`,`cuponclu_playpen120111`.`City`.`deal_count` AS `deal_count`,`cuponclu_playpen120111`.`City`.`active_deal_count` AS `active_deal_count`,`cuponclu_playpen120111`.`City`.`is_approved` AS `is_approved`,`cuponclu_playpen120111`.`City`.`fb_user_id` AS `fb_user_id`,`cuponclu_playpen120111`.`City`.`fb_access_token` AS `fb_access_token`,`cuponclu_playpen120111`.`City`.`twitter_username` AS `twitter_username`,`cuponclu_playpen120111`.`City`.`twitter_password` AS `twitter_password`,`cuponclu_playpen120111`.`City`.`twitter_access_token` AS `twitter_access_token`,`cuponclu_playpen120111`.`City`.`twitter_access_key` AS `twitter_access_key`,`cuponclu_playpen120111`.`City`.`twitter_url` AS `twitter_url`,`cuponclu_playpen120111`.`City`.`facebook_url` AS `facebook_url`,`cuponclu_playpen120111`.`Attachment`.`id` AS `id`,`cuponclu_playpen120111`.`Attachment`.`dir` AS `dir`,`cuponclu_playpen120111`.`Attachment`.`filename` AS `filename`,`cuponclu_playpen120111`.`Attachment`.`width` AS `width`,`cuponclu_playpen120111`.`Attachment`.`height` AS `height`,`cuponclu_playpen120111`.`Fbpicture`.`id` AS `id`,`cuponclu_playpen120111`.`Fbpicture`.`dir` AS `dir`,`cuponclu_playpen120111`.`Fbpicture`.`filename` AS `filename`,`cuponclu_playpen120111`.`Fbpicture`.`width` AS `width`,`cuponclu_playpen120111`.`Fbpicture`.`height` AS `height` from `cuponclu_playpen120111`.`deals` `Deal` left join `cuponclu_playpen120111`.`cities` `City` on((`cuponclu_playpen120111`.`City`.`id` = 42563)) left join `cuponclu_playpen120111`.`attachments` `Attachment` on(((`cuponclu_playpen120111`.`Attachment`.`foreign_id` = `cuponclu_playpen120111`.`Deal`.`id`) and (`cuponclu_playpen120111`.`Attachment`.`class` = 'Deal'))) left join `cuponclu_playpen120111`.`fbpictures` `Fbpicture` on(((`cuponclu_playpen120111`.`Fbpicture`.`foreign_id` = `cuponclu_playpen120111`.`Deal`.`id`) and (`cuponclu_playpen120111`.`Fbpicture`.`class` = 'Deal'))) where ((`cuponclu_playpen120111`.`Deal`.`city_id` = 42563) and (`cuponclu_playpen120111`.`Deal`.`deal_status_id` in (2,5)) and (`cuponclu_playpen120111`.`Deal`.`slug` <> '¡paga-q75-en-lugar-de-q150-po')) order by `cuponclu_playpen120111`.`Deal`.`sort_order` limit 68 |
|
| 89 | SELECT `Picture`.`id`, `Picture`.`dir`, `Picture`.`filename`, `Picture`.`width`, `Picture`.`height`, `Picture`.`foreign_id` FROM `pictures` AS `Picture` WHERE `Picture`.`class` = 'Deal' AND `Picture`.`foreign_id` IN (6815, 6814, 6812, 6811, 6810, 6809, 6801, 6798, 6797, 6796) ORDER BY `Picture`.`id` ASC | | 0 | 0 | 0 |
| EXPLAIN | | Id | Select Type | Table | Type | Possible Keys | Key | Key Len | Ref | Rows | Extra |
|---|
| 1 | SIMPLE | Picture | | ALL | | | | | 27 | 5.00 | Using where; Using filesort |
| Level | Code | Message |
|---|
| Note | 1003 | /* select#1 */ select `cuponclu_playpen120111`.`Picture`.`id` AS `id`,`cuponclu_playpen120111`.`Picture`.`dir` AS `dir`,`cuponclu_playpen120111`.`Picture`.`filename` AS `filename`,`cuponclu_playpen120111`.`Picture`.`width` AS `width`,`cuponclu_playpen120111`.`Picture`.`height` AS `height`,`cuponclu_playpen120111`.`Picture`.`foreign_id` AS `foreign_id` from `cuponclu_playpen120111`.`pictures` `Picture` where ((`cuponclu_playpen120111`.`Picture`.`class` = 'Deal') and (`cuponclu_playpen120111`.`Picture`.`foreign_id` in (6815,6814,6812,6811,6810,6809,6801,6798,6797,6796))) order by `cuponclu_playpen120111`.`Picture`.`id` |
|