 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPMaster.com: MongoDB Indexing, Part 2
by Chris Cornutt May 13, 2013 @ 10:36:46
PHPMaster.com has posted part two of their series looking at indexing in MongoDB databases (part one here) with some more advanced concepts Mongo makes available.
In part 1 of this series we had an introduction to indexing in MongoDB. we saw how to create, use, and analyze queries with indexes giving us a good foundation to build on. In this part, we'll take a look at a few more small but important concepts, like indexing on sub-documents and embedded fields, covered queries, and index direction.
They use the same "posts" collection from the previous article, showing you how to index it based on a "location" sub document and "embedded fields" inside of it. They also touch on complex sorting with a multi-field index and the idea of "covered queries." These are queries that all fields queried are part of an index as well as all returned. They finish up the article by showing you how to remove indexes too.
voice your opinion now!
mongodb index tutorial example series query
PHPMaster.com: MongoDB Indexing, Part 1
by Chris Cornutt May 06, 2013 @ 11:50:44
New on PHPMaster.com is the first part of their series about indexing in MongoDB, a method for optimizing your collections to make querying them even faster. They cover the five main types of indexes and situations where they can help.
Indexing is one of the more important concepts of working with MongoDB. A proper understanding is critical because indexing can dramatically increase performance and throughput by reducing the number of full documents to be read, thereby increasing the performance of our application. Because indexes can be bit difficult to understand, this two-part series will take a closer look at them.
They look at the default "_id" index, secondary, compound, multikey and multikey compound indexes. Example documents and results are included as well as some of the options that can be set on the index types to tweak performance. They finish up the article with a look at some of the limitations and considerations to think about when using indexing, including that they cannot be used with regex queries.
voice your opinion now!
mongodb index tutorial example document query series
Lorna Mitchell: Installing XHGui
by Chris Cornutt March 07, 2013 @ 12:15:01
Lorna Mitchell has a new post today showing you how to install XHGui to help with profiling your application for performance and processing issues.
If you're not familiar with XHGui it's a fabulously easy and friendly way to profile your application; to understand which method calls in a page take the time and how many times they are made, so you can improve the performance of your application. All these instructions are for my 32-bit Ubuntu 12.10 system, hopefully they will work for you or you'll be able to adapt them as appropriate.
She lists the dependencies you'll need to have installed before you can get XHGui working correctly including a MongoDB instance and the PECL xhprof extension. With those all set to go, you can go grab the latest XHGui from github and drop it into place.
voice your opinion now!
xhgui xhprof profile application installation pecl mongodb
Derick Rethans: MongoDB's aggregation framework
by Chris Cornutt January 22, 2013 @ 09:27:18
Derick Rethans has a new post to his site introducing the aggregation framework that's a part of the MonogDB database system. The aggregation framework gives you functionality to access aggregated values from queries without having to map/reduce.
I wanted to find out which cuisines are used in all of the documents of my dataset. Described in a different way: I want all the different cuisine=... tags as used in my dataset. Traditionally you would write a really complex™ Map/Reduce job, but since MongoDB 2.2, there is a new feature called the aggregation framework. The aggregation framework is meant to be an easy way to do fairly complex aggregation jobs.
He talks about the various keywords and features the framework provides like "$match", "$project" and "$unwind". There's also code snippets included that show both the Mongo command line format and the PHP MongoClient format for making the queries. For those more familiar with writing RDBMS SQL, this functionality might help to replace some of the concepts you've been missing.
voice your opinion now!
mongodb aggregation framework introduction tutorial
Derick Rethans: Read Preferences wth the MongoDB PHP driver
by Chris Cornutt December 20, 2012 @ 13:41:24
Derick Rethans has a new post to his site detailing some of the "read" preferences that you can customize in the latest versions of the MongoClient functionality in the MongoDB PHP extension for replica sets and sharing setups.
Read Preferences are a new Replica Set and Sharding feature implemented by most MongoDB drivers that are supported by 10gen. This functionality requires MongoDB 2.2. In short, Read Preferences allow you to configure from which nodes you prefer the driver reads data from. In a Replica Set environment it is the driver that does the selection of the preferred node, and in a Sharded environment it is the mongos process that routes queries according to the defined Read Preferences.
He starts with a look at the read preference types (like "primary", "secondary" and "nearest") how the connection manager works to handle each type. He includes some code samples showing how to configure your MongoClient connections to use these various types of preferences. He also introduces the concept of "tags" for the replica set - aliases to make them a bit easier to identify when making a connection and how to define them in the connection string.
voice your opinion now!
mongodb mongoclient read preference replicaset sharding connection tutorial
Derick Rethans: Debugging Connections with the MongoDB PHP driver
by Chris Cornutt December 11, 2012 @ 10:20:13
Derick Rethans has a new post that the developers out there using MongoDB in their applications will find useful - a look at debugging your connections with the PHP driver (and what kind of information it can provide).
In a previous article I already mentioned that the 1.3 version of the MongoDB driver has improved logging functionality to aid with debugging connection issues. I've already briefly introduced MongoClient::getConnections(), but it provides a bit more information than I have already shown. The other improvement are changes to the MongoLog class.
He includes details on the information that comes back from the MongoDB "getConnections" call including the hash of the connection, the "last ping" time, connection type and a set of tags. He also shows how to enable the Mongolog logging, the levels of logging it allows and what kind of log messages you can expect it to output.
voice your opinion now!
mongodb driver connection debug mongolog
Derick Rethans: Connection Handling with the MongoDB PHP driver
by Chris Cornutt December 04, 2012 @ 10:54:15
Continuing on with his look at the newly released version of the MongoDB driver for PHP Derick Rethans has posted more detail about the advanced connection handling options this new driver version provides.
The 1.3 release series of the PHP MongoDB driver features a rewritten connection handling library. This is quite a large change and changes how the PHP driver deals with persistent connections and connection pooling.
He starts with an example of a v1.2 driver connection, how the connection is requested from a pool and how, based on the integration of a worker into the connection process, v1.3 handles the connection requests. He includes a bit about replica set connections and authentication connections, complete with PHP code examples showing them in practice.
voice your opinion now!
connection handling tutorial mongodb driver version
DZone.com: Setting Up MongoDB on a Mac
by Chris Cornutt October 22, 2012 @ 11:31:32
In this new post to DZone.com Andy Hawthorne explains how to install MongoDB on OSX and get a local PHP working with it.
MongoDB is a document oriented, NoSQL database. It is gathering momentum and popularity amongst developers because it is flexible, and scalable at the same time. In this article I will describe how I got it set up and working on my Mac running OS X 10.8.2 and MAMP with PHP 5.2.17, and PHP 5.3.6.
They go a bit simpler route than trying to compile it yourself by using the binaries direct from the source. Instructions are included to test the installation, insert a record and how to install the MongoDB PHP driver for a MAMP installation. It's a shared object, though, so it's not specific to MAMP and could be installed even on the local OSX PHP functionality.
voice your opinion now!
mongodb mac osx mamp driver binaries tutorial
Derick Rethans: Derick's MongoDB tour
by Chris Cornutt August 20, 2012 @ 11:56:17
If you're interested in hearing about MongoDB (and PHP) and are living on the southeast coast of the US, you're in luck - Derick Rethans is making a tour of the area and hitting several major user groups along the way.
It has been a while since I have written anything. In the last few months I have been busy rewriting the connection handling parts of the MongoDB driver for PHP. [...] Some time ago, my friend Ligaya Turmelle suggested that I should come and talk at the JaxPHP/JaxWeb, the PHP and web developers usergroup in Jacksonville, Florida. And while I was there, why not visit a few other user groups too?
From September 18th through the 24th, he'll be visiting the following cities (and bringing swag with him):
- Boca Raton, Florida
- Orlando, Florida
- Jacksonville, Floria
- Atlanta, Georgia
- Nashville, Tennessee
voice your opinion now!
mongodb usergroup tour derickrethans florida georgia tennessee
|
Community Events
Don't see your event here? Let us know!
|