46 reputation
3
bio website
location
age
visits member for 2 years, 3 months
seen 17 hours ago

Nov
25
asked Multilanguage category structure - standard vs. normalization?
Jun
1
comment Retrieving 10 records from multiple tables
I don't need the duplicate content. I want to avoid it. I did what I wanted with combining PHP and two different MySQL queries. But I want to do that with one SQL query.
Jun
1
comment Retrieving 10 records from multiple tables
And also, the tables have different columns. That's why it doesn't work.
Jun
1
comment Retrieving 10 records from multiple tables
This query can return duplicate rows. How can we avoid it?
Jun
1
awarded  Editor
Jun
1
revised Retrieving 10 records from multiple tables
deleted 68 characters in body
Jun
1
asked Retrieving 10 records from multiple tables
Sep
21
awarded  Custodian
Sep
10
comment Friends relations in MySQL
Thank you. I'll check that links. I will keep benchmarking and trying different methods to reach the best.
Sep
10
comment Friends relations in MySQL
I have replaced friendid-key to unique key (friendid,userid) and now results are about .00794 Is this as fast as it can get? Looking at the results do you think the first way is better (one row for each relation)? Because it's twice as less space than the second one and results are about the same with current setups.
Sep
10
comment Friends relations in MySQL
After a bunch of tests, I'll change table settings, add different indexes as you suggested.
Sep
10
comment Friends relations in MySQL
I have made some tests to see how fast is the current setup. I haven't changed the tables' scheme. First query 1,000,000 rows (user table) 2,045,007 rows (friends table - one row for each relation. Friendships are created randomly for 10.000 users) First query takes 0.01094 seconds to return 600 rows. Same query changed with UNION takes 0.0086 to return 600 rows. Second query 1,000,000 rows (user table) 4,048,781 rows (friends_twoway table - two rows for each relation) The second query in my first post takes 0.0090 sec. to return 600 rows. What do you think about these results?
Sep
10
reviewed Approve Friends relations in MySQL
Sep
10
awarded  Student
Sep
10
asked Friends relations in MySQL