CFMaBiSmAd
04-11-2007, 11:24 PM
Before you do this, be sure that the slowness is not due to a lack of indexed tables or poorly written queries.
When the mysql server is running on the same computer as the client making the queries, the data is transfered directly through memory between the mysql service and the client. If you instead do this through your wireless network, the transfer rate will be several orders of magnitude slower. So, if you are transferring large amounts of data into and out of the database per query, the speed will suffer due to the transfer rate and if the slowness is actually due to table design and query design, you will still suffer from the additional time it takes mysql to perform the query.
bzzrd2
04-12-2007, 05:23 AM
More like 4 - 5 seconds sometimes. I even put a new partition on the C drive and installed only the necessary stuff. No v-scan, no nothing. Still the same. It's almost as slow as my crappy host. Using Firefox gives it a marginal improvement. Oh, and the second computer did not pan out either. I'm Using MySql 5 and Apache. Lightning fast to view a page. Not so fast doing queries. Memory use is at about 30% and CPU goes to around 8 - 10%. I have been thinking about going with a dual core processor. Maybe it's time?
bzzrd2
04-12-2007, 04:27 PM
As far as I know the tables are indexed properly. I purchased the program and the writer says I will have no proplem with many thousand querys. It ran OK on my last host will 24,000 lines. I'm using XAMMP for Apache and MySql on localhost. I have no doubt that the new provider I'm using is terrible as I went back to the old (had some time left) and all was fine. (fast) I built the databse directly on there but it somehow got corrupted on my hard drive so I'm going from scratch again. The table looks like:
place
select from many places
select from A-Z
Select Place
Select A-Z
Select Place
Some have a lot of places. Some, only a few.
There are other small tables but this will be the largest.
bzzrd2
04-16-2007, 05:20 PM
Just out of curiosity, what would be the max categories would one expect to run well with this structure for "categories": Hop I explained that right. Inititially I will have 23,000 places and then I need to go up to around 250,000.
Category:
-Select Place (ie: country)
-select from many places (ie: state)
-select from A-Z
-Select Place (ie: city) - (Many)
Select A-Z
Select Place -(ie:Office) (Many)
CREATE TABLE `tf_categories` (
`id` bigint(20) NOT NULL auto_increment,
`cat_name` varchar(255) default NULL,
`pid` bigint(20) default NULL,
`clicks` bigint(20) default NULL,
`sb_fee` decimal(10,2) NOT NULL default '0.00',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3766 ;
--
-- Dumping data for table `tf_categories`
--
INSERT INTO `tf_categories` (`id`, `cat_name`, `pid`, `clicks`, `ts_fee`) VALUES
(1, 'Canada', 0, 0, 0.00),
(2, 'U.S.A.', 0, 0, 0.00),
(3, '* Select a Province', 1, 0, 0.00),
(4, 'Alberta', 1, 0, 0.00),
(5, 'British Columbia', 1, 0, 0.00),
(6, 'Manitoba', 1, 0, 0.00),
(7, 'New Brunswick', 1, 0, 0.00),
(8, 'Newfoundland', 1, 0, 0.00),
AND SO ON
AND SO ON
(17, '* Select a City in Wherever Starting With:', 4, 0, 0.00),
(18, 'A', 4, 0, 0.00),
(19, 'B', 4, 0, 0.00),
(20, 'C', 4, 0, 0.00),
(21, 'D', 4, 0, 0.00),
(22, 'E', 4, 0, 0.00),
(23, 'F', 4, 0, 0.00),
(24, 'G', 4, 0, 0.00),
(25, 'H', 4, 0, 0.00),
(26, 'I', 4, 0, 0.00),
(27, 'J', 4, 0, 0.00),
(28, 'K', 4, 0, 0.00),
AND SO ON AND SO ON
(49, '- Select Buildings City-', 18, 0, 0.00),
(50, 'ACADIA', 18, 0, 0.00),
AND SO ON
(51, '- Select Your Building -', 50, 0, 0.00),
(52, 'Acadia Building', 50, 0, 0.00),
(57, 'Hichem Building', 50, 0, 0.00),
(60, 'Salm Salem Building', 50, 0, 0.00),
(61, 'Selman Riza Building', 50, 0, 0.00),
firepages
04-17-2007, 02:54 AM
CFMaBiSmAd, sorry I only just spotted your original post, was not trying to double up on you!
(17, '* Select a City in Wherever Starting With:', 4, 0, 0.00),
I don't understand why this is in the same table as the data .. or is it ? if so then it looks wrong straight away but since I have no idea what your app is or does so thats an uneducated comment.
OK, now I see pid is probably the parent id & I am starting to get it....
(17, '* Select a City in Wherever Starting With:', 4, 0, 0.00),
&&
(18, 'A', 4, 0, 0.00),
should not be in the same table as (what I assume is) the real data
(50, 'ACADIA', 18, 0, 0.00), etc
so IF buildings are the endpoint (the data we are actually searching for) then they should be in their own table...
(e.g.)
b_name, b_city, b_state, b_country, b_clicks, b_ts_fee
so b_city,b_state,b_country are all indexes in separate lookup tables in countries, cities & states tables and the A,B,C , 'select * from' etc would not be in the database at all
not sure how far you are with this but I think you need to rethink this if you have a potential concurrent user base in the future.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.