Jump to content

beyzad

Members
  • Content Count

    109
  • Joined

  • Last visited

Community Reputation

0 Neutral

About beyzad

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    Georgia
  1. This is why i have in my query: AND `products_sub`.`ProductSubId` = ( SELECT `ProductSubId` FROM `products_sub` WHERE `PCode`=`products`.`PCode` AND `PQuantity` > 0 ORDER BY `ProviderPrice` LIMIT 1 ) And there is no relation between ` provider` and ` products_sub` tables using `PCode`. Tried this. also tried to index all fields that used in ORDER BY section. same result. The only field i can use in ORDER BY that will run fast is `PCode` itself....
  2. Hello guys. Please do me a favor and help me solve this slow query Tables: CREATE TABLE `products` ( `ProductId` int(11) NOT NULL AUTO_INCREMENT, `CategoryId` int(11) NOT NULL, `BrandId` int(11) DEFAULT NULL, `PCode` varchar(100) COLLATE utf8_persian_ci NOT NULL, `PName` varchar(255) COLLATE utf8_persian_ci NOT NULL, `UnitId` int(11) DEFAULT NULL, `PNameEn` varchar(250) COLLATE utf8_persian_ci DEFAULT NULL, `PShortName` varchar(100) COLLATE utf8_persian_ci DEFAULT NULL, `PDescription` varchar(250) COLLATE utf8_persian_ci DEFAULT NULL, `Weight` int(11) DEFAULT
  3. Oops! All the queries i tested and the code you used works. The only problem was the noob site https://www.keene.edu/campus/maps/tool/ i used to draw my polygon, has lat,lng reversed. So my polygon and points i exported from there was all wrong. Thanks for your help. cheers
  4. Used that. also used within. none works. In this page: http://www.justskins.com/forums/point-in-polygon-99698.html a guy said: Not sure if these functions works fine for polygons with 100+ points or not ...
  5. Hi there. I got a table named `area` that has a POLYGON field. There are some rows with specified area in table. Now i want to check if a point ("59.5594597, 36.3556769" for example) is within the polygons or not. searched a lot and none works. my polygon has 102 points in case of need. Thanks.
  6. Hello sir. My indexes are shown in the SQL provided above. There are 53.7MB data + 7MB index @ factors table and 88.9MB data + 13.1MB index @ factor_times table. If you have any suggestion changing my indexes, I'll appreciate that. This is not working. shouldn't the conditions for RIGHT table be in join part of query?
  7. Hello there. I have 2 table: factors: CREATE TABLE IF NOT EXISTS `factors` ( `vendor_id` varchar( COLLATE utf8_unicode_ci NOT NULL, `factor_key` varchar(18) COLLATE utf8_unicode_ci NOT NULL, `factor_status` enum('0','1','2','3','4','5','6','7','8','9','10','11') COLLATE utf8_unicode_ci NOT NULL DEFAULT '0' COMMENT '0: pending. 1: ready. 2:sent. 3:delivered. 4:canceled. 5:returned. 6:return_confirmed. 7: canceled_by_post. 8: banned. 9: waiting. 10: failed CASH. 11: transferred', UNIQUE KEY `factor_key` (`factor_key`), KEY `vendor_id` (`vendor_id`) ) ENGINE=MyISAM DEFAULT CHA
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.