MySQL Limits

  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Posts: 1127
  • Loc: San Diego

Post 3+ Months Ago

Does anyone know how I can do this in Mysql?

Select a limit of 4 photos, from a list of users

EG: I have users bob, jason and sue. They have uploaded about 20 photos each. But I only want 4 photos from each of them.

SELECT photoid FROM galleries WHERE user=bob OR user=jason or user=sue

This will give me ALL of their photos.

SELECT photoid FROM galleries WHERE user=bob OR user=jason or user=sue LIMIT 4

This will give me 4 photos from bob but nothing from jason or sue.

How do I get 12 photos, 4 from bob, 4 from jason, and 4 from sue? Must I use multiple MySQL statements?
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9102
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

If it were me I would probably use a statement like this:

MYSQL Code: [ Select ]
SELECT photoid, user
FROM galleries
WHERE user IN ('bob', 'jason', 'sue')
ORDER BY photoid DESC
  1. SELECT photoid, user
  2. FROM galleries
  3. WHERE user IN ('bob', 'jason', 'sue')
  4. ORDER BY photoid DESC


I am making the assumption here that the higher the photoid the newer the photo is. Then after that I would use whatever scripting language you are using to limit it to 4 results per user. For example:

PHP Code: [ Select ]
$photoArray = array();
while($row = mysql_fetch_row($result))
{
   if(count($photoArray[$row['user']]) < 4)
   {
      $photoArray[$row['user']][] = $row['photoid'];
   }
}
  1. $photoArray = array();
  2. while($row = mysql_fetch_row($result))
  3. {
  4.    if(count($photoArray[$row['user']]) < 4)
  5.    {
  6.       $photoArray[$row['user']][] = $row['photoid'];
  7.    }
  8. }


That would only add photoids to the specified user's array as long as they have less than 4 photos. I haven't tested this, but it would be something along these lines. In the end you would have a multidimensional array of users with their latest photo ids that you could do whatever you need with.
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Posts: 1127
  • Loc: San Diego

Post 3+ Months Ago

That would work. But I was thinking of a specific Mysql statement that would just get 4 images from each user...

Hmm
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

Here's what I did.

First my test table.

SQL Code: [ Select ]
--
-- Table structure for table `gallery`
--
 
CREATE TABLE `gallery` (
  `user` int(11) NOT NULL,
  `photo` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY  (`photo`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
 
  1. --
  2. -- Table structure for table `gallery`
  3. --
  4.  
  5. CREATE TABLE `gallery` (
  6.   `user` int(11) NOT NULL,
  7.   `photo` int(11) NOT NULL AUTO_INCREMENT,
  8.   PRIMARY KEY  (`photo`)
  9. ) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
  10.  


I inserted 12 rows for users 1, 2, and 3 manually real quick.

I tried this monster.

SQL Code: [ Select ]
SELECT
   a.user,
   a.photo AS aa,
   b.photo AS bb,
   c.photo AS cc,
   d.photo AS dd
FROM gallery a
   LEFT JOIN gallery b
      ON a.user = b.user
         AND a.photo <> b.photo
   LEFT JOIN gallery c
      ON b.user = c.user
         AND a.photo <> b.photo
         AND a.photo <> c.photo
         AND b.photo <> c.photo
   LEFT JOIN gallery d
      ON c.user = d.user
         AND a.photo <> b.photo
         AND a.photo <> c.photo
         AND a.photo <> d.photo
         AND b.photo <> c.photo
         AND b.photo <> d.photo
         AND c.photo <> d.photo
GROUP BY user
  1. SELECT
  2.    a.user,
  3.    a.photo AS aa,
  4.    b.photo AS bb,
  5.    c.photo AS cc,
  6.    d.photo AS dd
  7. FROM gallery a
  8.    LEFT JOIN gallery b
  9.       ON a.user = b.user
  10.          AND a.photo <> b.photo
  11.    LEFT JOIN gallery c
  12.       ON b.user = c.user
  13.          AND a.photo <> b.photo
  14.          AND a.photo <> c.photo
  15.          AND b.photo <> c.photo
  16.    LEFT JOIN gallery d
  17.       ON c.user = d.user
  18.          AND a.photo <> b.photo
  19.          AND a.photo <> c.photo
  20.          AND a.photo <> d.photo
  21.          AND b.photo <> c.photo
  22.          AND b.photo <> d.photo
  23.          AND c.photo <> d.photo
  24. GROUP BY user


Got a row for each of the 3 users with userid and 4 unique photos that belonged to them.

Then I added an index to user.

SQL Code: [ Select ]
--
-- Table structure for table `gallery`
--
 
CREATE TABLE `gallery` (
  `user` int(11) NOT NULL,
  `photo` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY  (`photo`),
  KEY `user` (`user`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
 
  1. --
  2. -- Table structure for table `gallery`
  3. --
  4.  
  5. CREATE TABLE `gallery` (
  6.   `user` int(11) NOT NULL,
  7.   `photo` int(11) NOT NULL AUTO_INCREMENT,
  8.   PRIMARY KEY  (`photo`),
  9.   KEY `user` (`user`)
  10. ) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
  11.  


Then I INSERT-SELECT-ed the table until it had 368K rows with unique photo columns.

Then I assigned those to roughly 100K random users.

SQL Code: [ Select ]
UPDATE gallery SET user = ROUND(RAND() * 100000)


Then I ran the monster from before, with the addition of a WHERE clause

SQL Code: [ Select ]
SELECT
   a.user,
   a.photo AS aa,
   b.photo AS bb,
   c.photo AS cc,
   d.photo AS dd
FROM gallery a
   LEFT JOIN gallery b
      ON a.user = b.user
         AND a.photo <> b.photo
   LEFT JOIN gallery c
      ON b.user = c.user
         AND a.photo <> b.photo
         AND a.photo <> c.photo
         AND b.photo <> c.photo
   LEFT JOIN gallery d
      ON c.user = d.user
         AND a.photo <> b.photo
         AND a.photo <> c.photo
         AND a.photo <> d.photo
         AND b.photo <> c.photo
         AND b.photo <> d.photo
         AND c.photo <> d.photo
WHERE a.user IN (100, 500, 10000, 25000)
GROUP BY user
  1. SELECT
  2.    a.user,
  3.    a.photo AS aa,
  4.    b.photo AS bb,
  5.    c.photo AS cc,
  6.    d.photo AS dd
  7. FROM gallery a
  8.    LEFT JOIN gallery b
  9.       ON a.user = b.user
  10.          AND a.photo <> b.photo
  11.    LEFT JOIN gallery c
  12.       ON b.user = c.user
  13.          AND a.photo <> b.photo
  14.          AND a.photo <> c.photo
  15.          AND b.photo <> c.photo
  16.    LEFT JOIN gallery d
  17.       ON c.user = d.user
  18.          AND a.photo <> b.photo
  19.          AND a.photo <> c.photo
  20.          AND a.photo <> d.photo
  21.          AND b.photo <> c.photo
  22.          AND b.photo <> d.photo
  23.          AND c.photo <> d.photo
  24. WHERE a.user IN (100, 500, 10000, 25000)
  25. GROUP BY user


It returned results in a fraction of a second on a fairly old computer. I'm assuming it's accurate because my initial test with no difference other than that WHERE clause was accurate.

There happened to be only 3 photos for user 500, so the 4th column was NULL.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9102
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

camperjohn wrote:
That would work. But I was thinking of a specific Mysql statement that would just get 4 images from each user...

Hmm


As far as I am aware there would be no such simple statement. You would have to do something like Joebert did above. The problem with Joebert's solution is that if down the road you want to change it to show 8, 10, or 20 photos from users that MySQL statement will get much more complicated. Sometimes it makes sense to use simplier MySQL statements with some coding to help. That is what I would do unless your MySQL statement is returning potentially millions of results, that PHP loop could be quite time consuming then and it may make more sense to limit the results returned like Joebert's example does.
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Posts: 1127
  • Loc: San Diego

Post 3+ Months Ago

Yeah I think I will just make a foreach loop and not let MySQL do it.

When I have to select 8 photos, from 2500 users, the MySQL statement will be horrendous.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

I'm interested in finding out what would be more efficient on a live site,

1) multiple queries
2) a function that generates that monster query

I actually had this problem on the back of my mind a couple of days ago as I want to pull a configurable number of columns for a variable number of categories when I get to doing the site/category index page stuff.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9102
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

In my experience monster queries are usually not as efficient as two more efficient queries. However, it really depends on how many results are being returned, how you end up processing the data, and if the monster query creates things like this:

Quote:
Using temporary; Using filesort


When using temporary tables it locks the entire table (if using MyISAM engine) and if you have alot of requests being made things can get backed up very quickly if that monster query isn't finishing fast and returning alot of results. That could eventually bring down the entire server if you have alot of traffic. That is one reason I prefer to have two quicker queries and put the load on PHP to help out. Also another thing to note is that some temporary tables are created in memory (fast), while others that are too large are created on disk (very slow). So if you have a query that is using temporary tables created on disk, the table could be locked for a long time which means everything trying to access that table will be on hold until it is finished. Not good.

Temporary tables aren't always a horrible thing, just if the query takes too long to complete. Sometimes temporary tables are necessary and are usually okay with very efficient queries. Here is a fairly good article:

http://www.sql-server-performance.com/a ... es_p1.aspx

I would be curious what an explain on your query would return Joebert.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

I'm thinking about it now, and I think the only reason that monster query did so well with 300K+ rows, is that the where clause and the index on the user column greatly reduced the number of columns grabbed for the joins.

My test table had 300K rows, but the max number of photos associated with any user was 14.

SQL Code: [ Select ]
SELECT COUNT( photo ) AS total
FROM `gallery`
GROUP BY user
ORDER BY total DESC
LIMIT 1
  1. SELECT COUNT( photo ) AS total
  2. FROM `gallery`
  3. GROUP BY user
  4. ORDER BY total DESC
  5. LIMIT 1


So I INSERT-SELECT-ed the table size to 1.5M rows, then I reduced the number of user ids to 25K.

That same monster query looks like it's going to take several minutes to return anything with this new table. I just restarted the MySQL server so I could find out the max number of rows any user has is 94.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9102
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Also when you get a chance post your explain results for that monster query:

SQL Code: [ Select ]
EXPLAIN SELECT
   a.user,
   a.photo AS aa,
   b.photo AS bb,
   c.photo AS cc,
   d.photo AS dd,
...
 
  1. EXPLAIN SELECT
  2.    a.user,
  3.    a.photo AS aa,
  4.    b.photo AS bb,
  5.    c.photo AS cc,
  6.    d.photo AS dd,
  7. ...
  8.  
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

This is from a copy of the gallery table with 110 rows in it and 21 users.
That monster query is really going to take awhile with 1.5M rows.

Code: [ Select ]
+----+-------------+-------+-------+---------------+------+---------+-------------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref     | rows | Extra    |
+----+-------------+-------+-------+---------------+------+---------+-------------+------+-------------+
| 1 | SIMPLE   | a   | range | user     | user | 4    | NULL    |  18 | Using where |
| 1 | SIMPLE   | b   | ref  | user     | user | 4    | test.a.user |  12 |       |
| 1 | SIMPLE   | c   | ref  | user     | user | 4    | test.b.user |  12 |       |
| 1 | SIMPLE   | d   | ref  | user     | user | 4    | test.c.user |  12 |       |
+----+-------------+-------+-------+---------------+------+---------+-------------+------+-------------+
4 rows in set (0.00 sec)
  1. +----+-------------+-------+-------+---------------+------+---------+-------------+------+-------------+
  2. | id | select_type | table | type | possible_keys | key | key_len | ref     | rows | Extra    |
  3. +----+-------------+-------+-------+---------------+------+---------+-------------+------+-------------+
  4. | 1 | SIMPLE   | a   | range | user     | user | 4    | NULL    |  18 | Using where |
  5. | 1 | SIMPLE   | b   | ref  | user     | user | 4    | test.a.user |  12 |       |
  6. | 1 | SIMPLE   | c   | ref  | user     | user | 4    | test.b.user |  12 |       |
  7. | 1 | SIMPLE   | d   | ref  | user     | user | 4    | test.c.user |  12 |       |
  8. +----+-------------+-------+-------+---------------+------+---------+-------------+------+-------------+
  9. 4 rows in set (0.00 sec)
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9102
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Wow so that small table with 21 users require you to still search 31,104 rows. You get that by multiplying all the rows together on that explain. So 18x12x12x12 = 31,104. I wonder how many it would search if you have 10000 users.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

Another case where any way you look at it, a one-liner just isn't an option. It might work well for several users who have only a few photos, but when do you ever see that ?
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Posts: 1127
  • Loc: San Diego

Post 3+ Months Ago

My table size is about 40,000 galleries, 100,000+ images and videos, and about 35,000 members. Many members have 0 photos.
  • Unisys Systems
  • Born
  • Born
  • Unisys Systems
  • Posts: 1

Post 3+ Months Ago

Thanx for sharing Knowledge its use full for me




:)
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

I finally got around to the part of my project that needs to do something like this yesterday. I just wanted to make a note of two ways I tried.

Here's the first attempt. It averages 1.6 seconds to generate the page on the test server.

PHP Code: [ Select ]
   $result = $db->query('SELECT category_id, label, description FROM ' . CATEGORIES_TABLE . ' WHERE soi = TRUE ORDER BY label ASC', MYSQLI_USE_RESULT);
   while($row = $result->fetch_object())
   {
      $c->categories[]  = $row;
   }
   $result->close();
 
   $sql = $db->prepare('
      SELECT wp.label, wp.path, wp.wallpaper_id
         FROM ' . CAT_WP_RELATIONS_TABLE . ' rel
            LEFT JOIN ' . WALLPAPERS_TABLE . ' wp
               ON rel.wallpaper_id = wp.wallpaper_id
         WHERE rel.category_id IN ((SELECT category_id FROM ' . CATEGORIES_TABLE . " WHERE ? IN(category_id, parent_id)))
      ORDER BY rel.insert_order DESC LIMIT {$config->options->index->new_wallpapers->count}"
   );
   if(!$sql){$page->messages .= new message($db->error);}
   else{$sql->bind_param('s', $c->category_id);}
   
   foreach($c->categories as &$c->category)
   {if(!$sql){continue;}
      $c->category->url = sprintf($config->options->url->rewrite_mode ? $config->options->url->category_mask : 'index.php?category_id=%1$s&page=%3$s',
         $c->category->category_id,
         string_utils::htmlentities($c->category->label),
         1
      );
      $c->category_id   = $c->category->category_id;
      $c->wallpapers = '';
      if($sql->execute())
      {
         $sql->bind_result($c->wallpaper->label, $c->wallpaper->path, $c->wallpaper->wallpaper_id);
         while($sql->fetch())
         {
  1.    $result = $db->query('SELECT category_id, label, description FROM ' . CATEGORIES_TABLE . ' WHERE soi = TRUE ORDER BY label ASC', MYSQLI_USE_RESULT);
  2.    while($row = $result->fetch_object())
  3.    {
  4.       $c->categories[]  = $row;
  5.    }
  6.    $result->close();
  7.  
  8.    $sql = $db->prepare('
  9.       SELECT wp.label, wp.path, wp.wallpaper_id
  10.          FROM ' . CAT_WP_RELATIONS_TABLE . ' rel
  11.             LEFT JOIN ' . WALLPAPERS_TABLE . ' wp
  12.                ON rel.wallpaper_id = wp.wallpaper_id
  13.          WHERE rel.category_id IN ((SELECT category_id FROM ' . CATEGORIES_TABLE . " WHERE ? IN(category_id, parent_id)))
  14.       ORDER BY rel.insert_order DESC LIMIT {$config->options->index->new_wallpapers->count}"
  15.    );
  16.    if(!$sql){$page->messages .= new message($db->error);}
  17.    else{$sql->bind_param('s', $c->category_id);}
  18.    
  19.    foreach($c->categories as &$c->category)
  20.    {if(!$sql){continue;}
  21.       $c->category->url = sprintf($config->options->url->rewrite_mode ? $config->options->url->category_mask : 'index.php?category_id=%1$s&page=%3$s',
  22.          $c->category->category_id,
  23.          string_utils::htmlentities($c->category->label),
  24.          1
  25.       );
  26.       $c->category_id   = $c->category->category_id;
  27.       $c->wallpapers = '';
  28.       if($sql->execute())
  29.       {
  30.          $sql->bind_result($c->wallpaper->label, $c->wallpaper->path, $c->wallpaper->wallpaper_id);
  31.          while($sql->fetch())
  32.          {


Then there's the second attempt, takes 0.19 seconds on average to generate the page.

PHP Code: [ Select ]
   $c->categories = array();
   
   $result = $db->query('SELECT category_id, label, description FROM ' . CATEGORIES_TABLE . ' WHERE soi = TRUE', MYSQLI_USE_RESULT);
   while($row = $result->fetch_object())
   {
      $row->sub_categories          = array($row->category_id => $row->category_id);
      $c->categories[$row->category_id]   = $row;
   }
   $result->close();
   
   $result = $db->query('
      SELECT category_id, parent_id
         FROM ' . CATEGORIES_TABLE . '
         WHERE parent_id IN(' . implode(',', array_keys($c->categories)) . ')'
   );
   while($row = $result->fetch_object())
   {
      $c->categories[$row->parent_id]->sub_categories[$row->category_id] = $row->category_id;
   }
   $result->close();
   
   $c->max_subs = 0;
   foreach($c->categories as &$c->category)
   {
      $c->max_subs = max($c->max_subs, count($c->category->sub_categories));
   }
   foreach($c->categories as &$c->category)
   {
      $c->category->sub_categories = array_pad($c->category->sub_categories, $c->max_subs, current($c->category->sub_categories));
   }
   
   function __sort_cats_label($a, $b){return mb_strtolower($a->label) > mb_strtolower($b->label) ? 1 : -1;}
   usort($c->categories, '__sort_cats_label');
 
   $sql = $db->prepare('
      SELECT wp.label, wp.path, wp.wallpaper_id
         FROM ' . CAT_WP_RELATIONS_TABLE . ' rel
            LEFT JOIN ' . WALLPAPERS_TABLE . ' wp
               ON rel.wallpaper_id = wp.wallpaper_id
         WHERE rel.category_id IN (' . implode(',', array_fill(0, $c->max_subs, '?')) . ")
      ORDER BY rel.insert_order DESC LIMIT {$config->options->index->new_wallpapers->count}"
   );
   if(!$sql){$page->messages .= new message($db->error);}
   
   foreach($c->categories as &$c->category)
   {if(!$sql){continue;}
      $c->category->url = sprintf($config->options->url->rewrite_mode ? $config->options->url->category_mask : 'index.php?category_id=%1$s&page=%3$s',
         $c->category->category_id,
         string_utils::htmlentities($c->category->label),
         1
      );
      array_unshift($c->category->sub_categories, str_repeat('i', $c->max_subs));
      call_user_func_array(array($sql, 'bind_param'), $c->category->sub_categories);
      $c->wallpapers = '';
      if($sql->execute())
      {
         $sql->bind_result($c->wallpaper->label, $c->wallpaper->path, $c->wallpaper->wallpaper_id);
         while($sql->fetch())
         {
  1.    $c->categories = array();
  2.    
  3.    $result = $db->query('SELECT category_id, label, description FROM ' . CATEGORIES_TABLE . ' WHERE soi = TRUE', MYSQLI_USE_RESULT);
  4.    while($row = $result->fetch_object())
  5.    {
  6.       $row->sub_categories          = array($row->category_id => $row->category_id);
  7.       $c->categories[$row->category_id]   = $row;
  8.    }
  9.    $result->close();
  10.    
  11.    $result = $db->query('
  12.       SELECT category_id, parent_id
  13.          FROM ' . CATEGORIES_TABLE . '
  14.          WHERE parent_id IN(' . implode(',', array_keys($c->categories)) . ')'
  15.    );
  16.    while($row = $result->fetch_object())
  17.    {
  18.       $c->categories[$row->parent_id]->sub_categories[$row->category_id] = $row->category_id;
  19.    }
  20.    $result->close();
  21.    
  22.    $c->max_subs = 0;
  23.    foreach($c->categories as &$c->category)
  24.    {
  25.       $c->max_subs = max($c->max_subs, count($c->category->sub_categories));
  26.    }
  27.    foreach($c->categories as &$c->category)
  28.    {
  29.       $c->category->sub_categories = array_pad($c->category->sub_categories, $c->max_subs, current($c->category->sub_categories));
  30.    }
  31.    
  32.    function __sort_cats_label($a, $b){return mb_strtolower($a->label) > mb_strtolower($b->label) ? 1 : -1;}
  33.    usort($c->categories, '__sort_cats_label');
  34.  
  35.    $sql = $db->prepare('
  36.       SELECT wp.label, wp.path, wp.wallpaper_id
  37.          FROM ' . CAT_WP_RELATIONS_TABLE . ' rel
  38.             LEFT JOIN ' . WALLPAPERS_TABLE . ' wp
  39.                ON rel.wallpaper_id = wp.wallpaper_id
  40.          WHERE rel.category_id IN (' . implode(',', array_fill(0, $c->max_subs, '?')) . ")
  41.       ORDER BY rel.insert_order DESC LIMIT {$config->options->index->new_wallpapers->count}"
  42.    );
  43.    if(!$sql){$page->messages .= new message($db->error);}
  44.    
  45.    foreach($c->categories as &$c->category)
  46.    {if(!$sql){continue;}
  47.       $c->category->url = sprintf($config->options->url->rewrite_mode ? $config->options->url->category_mask : 'index.php?category_id=%1$s&page=%3$s',
  48.          $c->category->category_id,
  49.          string_utils::htmlentities($c->category->label),
  50.          1
  51.       );
  52.       array_unshift($c->category->sub_categories, str_repeat('i', $c->max_subs));
  53.       call_user_func_array(array($sql, 'bind_param'), $c->category->sub_categories);
  54.       $c->wallpapers = '';
  55.       if($sql->execute())
  56.       {
  57.          $sql->bind_result($c->wallpaper->label, $c->wallpaper->path, $c->wallpaper->wallpaper_id);
  58.          while($sql->fetch())
  59.          {


In both situations it's generating a page for 15 categories total, a couple are parent categories that include 1-10 sub categories.
I'm thinking about adding two columns to the categories table called "min_id" and "max"id" that line up with the insert_id column on my relations table that I can use with a BETWEEN clause to cut down on the number of rows it needs to scan. I have to work out how to handle updating those indexes though.

Post Information

  • Total Posts in this topic: 16 posts
  • Users browsing this forum: No registered users and 24 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.