browseablesessionbackend.html 19.5 KB
Newer Older
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
1 2 3 4 5 6
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
  <meta charset="utf-8" />
  <title>documentation:2.0:browseablesessionbackend</title>
<meta name="generator" content="DokuWiki"/>
Xavier Guimard's avatar
Xavier Guimard committed
7
<meta name="robots" content="index,follow"/>
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
8 9 10 11 12
<meta name="keywords" content="documentation,2.0,browseablesessionbackend"/>
<link rel="search" type="application/opensearchdescription+xml" href="lib/exe/opensearch.html" title="LemonLDAP::NG"/>
<link rel="start" href="browseablesessionbackend.html"/>
<link rel="contents" href="browseablesessionbackend.html" title="Sitemap"/>
<link rel="stylesheet" type="text/css" href="lib/exe/css.php.t.bootstrap3.css"/>
Xavier Guimard's avatar
Xavier Guimard committed
13 14 15 16 17 18 19 20 21
<!-- //if:usedebianlibs
  <link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap.min.css" />
//elsif:useexternallibs
  <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></script>
//elsif:cssminified
  <link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.min.css" />
//else -->
  <link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.css" />
<!-- //endif -->
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
22 23 24
<script type="text/javascript">/*<![CDATA[*/var NS='documentation:2.0';var JSINFO = {"id":"documentation:2.0:browseablesessionbackend","namespace":"documentation:2.0"};
/*!]]>*/</script>
<script type="text/javascript" charset="utf-8" src="lib/exe/js.php.t.bootstrap3.js"></script>
Xavier Guimard's avatar
Xavier Guimard committed
25 26 27 28 29 30 31 32 33 34 35 36 37 38
<!-- //if:usedebianlibs
<script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
//elsif:useexternallibs
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
//elsif:jsminified
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.min.js"></script>
//else -->
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.js"></script>
<!-- //endif -->
<!-- //if:usedebianlibs
  <script type="text/javascript" src="/javascript/jquery-ui/jquery-ui.min.js"></script>
//elsif:useexternallibs
  <script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
//elsif:jsminified
Xavier Guimard's avatar
Xavier Guimard committed
39
  <script type="text/javascript" src="/static/bwr/jquery-ui/jquery-ui.min.js"></script>
Xavier Guimard's avatar
Xavier Guimard committed
40
//else -->
Xavier Guimard's avatar
Xavier Guimard committed
41
  <script type="text/javascript" src="/static/bwr/jquery-ui/jquery-ui.js"></script>
Xavier Guimard's avatar
Xavier Guimard committed
42
<!-- //endif -->
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
</head>
<body>
<div class="dokuwiki export container">
<!-- TOC START -->
<div id="dw__toc">
<h3 class="toggle">Table of Contents</h3>
<div>

<ul class="toc">
<li class="level1"><div class="li"><a href="#presentation">Presentation</a></div></li>
<li class="level1"><div class="li"><a href="#browseable_nosql">Browseable NoSQL</a></div></li>
<li class="level1"><div class="li"><a href="#browseable_sql">Browseable SQL</a></div>
<ul class="toc">
<li class="level2"><div class="li"><a href="#prepare_database">Prepare database</a></div></li>
<li class="level2"><div class="li"><a href="#manager">Manager</a></div></li>
</ul>
</li>
<li class="level1"><div class="li"><a href="#browseable_ldap">Browseable LDAP</a></div></li>
<li class="level1"><div class="li"><a href="#security">Security</a></div></li>
Xavier Guimard's avatar
Xavier Guimard committed
62
<li class="level1"><div class="li"><a href="#performances">Performances</a></div></li>
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
63 64 65 66 67 68 69 70 71 72 73 74 75 76
</ul>
</div>
</div>
<!-- TOC END -->

<h1 class="sectionedit1" id="browseable_session_backend">Browseable session backend</h1>
<div class="level1">

</div>
<!-- EDIT1 SECTION "Browseable session backend" [1-42] -->
<h2 class="sectionedit2" id="presentation">Presentation</h2>
<div class="level2">

<p>
Clément OUDOT's avatar
Clément OUDOT committed
77
Browseable session backend (<a href="https://metacpan.org/pod/Apache::Session::Browseable" class="urlextern" title="https://metacpan.org/pod/Apache::Session::Browseable"  rel="nofollow">Apache::Session::Browseable</a>) works exactly like Apache::Session::* corresponding module but add index that increase <a href="documentation/features.html#session_explorer" class="wikilink1" title="documentation:features">session explorer</a> and <a href="documentation/features.html#session_restrictions" class="wikilink1" title="documentation:features">session restrictions</a> performances.
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
</p>

<p>
If you use features like <abbr title="Security Assertion Markup Language">SAML</abbr> (authentication and issuer), <abbr title="Central Authentication Service">CAS</abbr> (issuer) and password reset self-service, you also need to index some fields.
</p>
<div class="noteclassic">Without index, <abbr title="LemonLDAP::NG">LL::NG</abbr> will have to retrieve all sessions stored in backend and parse them to find the needed sessions. With index, <abbr title="LemonLDAP::NG">LL::NG</abbr> wil be able to get only wanted sessions from the backend.
</div>
<p>
The following table list fields to index depending on the feature you want to increase performance:
</p>
<div class="table sectionedit3"><table class="inline table table-bordered table-striped">
	<thead>
	<tr class="row0 roweven">
		<th class="col0 centeralign">  Feature  </th><th class="col1 centeralign">  Fields to index  </th>
	</tr>
	</thead>
	<tr class="row1 rowodd">
Xavier Guimard's avatar
Xavier Guimard committed
95
		<td class="col0"> Database cleaup <em>(cron)</em> </td><td class="col1 centeralign">  _session_kind _utime  </td>
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
96 97
	</tr>
	<tr class="row2 roweven">
Xavier Guimard's avatar
Xavier Guimard committed
98
		<td class="col0"> Session explorer </td><td class="col1 centeralign">  _session_kind ipAddr <em>WHATTOTRACE</em>  </td>
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
99 100
	</tr>
	<tr class="row3 rowodd">
Xavier Guimard's avatar
Xavier Guimard committed
101
		<td class="col0"> Session explorer (persistent sessions) </td><td class="col1 centeralign">  _session_kind _session_uid  </td>
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
102 103
	</tr>
	<tr class="row4 roweven">
Xavier Guimard's avatar
Xavier Guimard committed
104
		<td class="col0"> Session restrictions </td><td class="col1 centeralign">  _session_kind ipAddr <em>WHATTOTRACE</em>  </td>
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
105 106
	</tr>
</table></div>
Clément OUDOT's avatar
Clément OUDOT committed
107
<!-- EDIT3 TABLE [871-1162] -->
Xavier Guimard's avatar
Xavier Guimard committed
108 109 110 111
<p>
See Apache::Session::Browseable::* man page to see how use indexes.
</p>
<div class="noteimportant"><em>WHATTOTRACE</em> must be replaced by the attribute or macro configured in the What To Trace parameter (REMOTE_USER). By default: <strong>_whatToTrace</strong>
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
112 113 114 115
</div><div class="notetip">It is advised to use separate session backends for standard sessions, <abbr title="Security Assertion Markup Language">SAML</abbr> sessions and <abbr title="Central Authentication Service">CAS</abbr> sessions, in order to manage index separately.
</div><div class="noteclassic">Documentation below explains how set index on ipAddr and _whatToTrace. Adapt it to configure the index you need.
</div>
</div>
Clément OUDOT's avatar
Clément OUDOT committed
116
<!-- EDIT2 SECTION "Presentation" [43-1685] -->
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
<h2 class="sectionedit4" id="browseable_nosql">Browseable NoSQL</h2>
<div class="level2">

<p>
You can use Redis and set up the database like explained in <a href="nosqlsessionbackend.html" class="wikilink1" title="documentation:2.0:nosqlsessionbackend">Redis session backend</a>.
</p>

<p>
You then just have to add the <code>Index</code> parameter  in <code>General parameters</code> » <code>Sessions</code> » <code>Session storage</code> » <code>Apache::Session module</code> :
</p>
<div class="table sectionedit5"><table class="inline table table-bordered table-striped">
	<thead>
	<tr class="row0 roweven">
		<th class="col0 centeralign" colspan="3">  Required parameters  </th>
	</tr>
	<tr class="row1 rowodd">
		<th class="col0 centeralign">  Name  </th><th class="col1 centeralign">  Comment  </th><th class="col2 centeralign">  Example  </th>
	</tr>
	</thead>
	<tr class="row2 roweven">
		<td class="col0 centeralign">  <strong>server</strong>  </td><td class="col1"> Redis server </td><td class="col2"> 127.0.0.1:6379 </td>
	</tr>
	<tr class="row3 rowodd">
		<td class="col0 centeralign">  <strong>Index</strong>  </td><td class="col1"> Index </td><td class="col2"> _whatToTrace ipAddr </td>
	</tr>
</table></div>
Clément OUDOT's avatar
Clément OUDOT committed
143
<!-- EDIT5 TABLE [1973-2130] -->
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
144
</div>
Clément OUDOT's avatar
Clément OUDOT committed
145
<!-- EDIT4 SECTION "Browseable NoSQL" [1686-2131] -->
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
146 147
<h2 class="sectionedit6" id="browseable_sql">Browseable SQL</h2>
<div class="level2">
Xavier Guimard's avatar
Xavier Guimard committed
148
<div class="noteclassic">This documentation concerns PostgreSQL. Some adaptations are needed with other databases.
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
149 150
</div>
</div>
Clément OUDOT's avatar
Clément OUDOT committed
151
<!-- EDIT6 SECTION "Browseable SQL" [2132-2263] -->
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
152 153 154 155 156 157
<h3 class="sectionedit7" id="prepare_database">Prepare database</h3>
<div class="level3">

<p>
Database must be prepared exactly like in <a href="sqlsessionbackend.html#prepare_the_database" class="wikilink1" title="documentation:2.0:sqlsessionbackend">SQL session backend</a> except that a field must be added for each data to index.
</p>
Xavier Guimard's avatar
Xavier Guimard committed
158 159 160 161 162 163 164 165
<pre class="code file sql"> Apache::<span class="kw1">SESSION</span>::Browseable::Postgres example:
<span class="sy0">&lt;</span>code sql<span class="sy0">&gt;</span>
<span class="kw1">CREATE</span> UNLOGGED <span class="kw1">TABLE</span> sessions <span class="br0">&#40;</span>
    id <span class="kw1">VARCHAR</span><span class="br0">&#40;</span><span class="nu0">64</span><span class="br0">&#41;</span> <span class="kw1">NOT</span> <span class="kw1">NULL</span> <span class="kw1">PRIMARY</span> <span class="kw1">KEY</span><span class="sy0">,</span>
    a_session text<span class="sy0">,</span>
    _whatToTrace text<span class="sy0">,</span>
    _session_kind text<span class="sy0">,</span>
    _utime <span class="kw1">BIGINT</span><span class="sy0">,</span>
Clément OUDOT's avatar
Clément OUDOT committed
166
    <span class="kw1">USER</span> text<span class="sy0">,</span>
Xavier Guimard's avatar
Xavier Guimard committed
167 168 169 170 171 172 173
    ipAddr text
<span class="br0">&#41;</span>;
<span class="kw1">CREATE</span> <span class="kw1">INDEX</span> uid1 <span class="kw1">ON</span> sessions <span class="kw1">USING</span> BTREE <span class="br0">&#40;</span>_whatToTrace<span class="br0">&#41;</span>;
<span class="kw1">CREATE</span> <span class="kw1">INDEX</span> s1   <span class="kw1">ON</span> sessions <span class="br0">&#40;</span>_session_kind<span class="br0">&#41;</span>;
<span class="kw1">CREATE</span> <span class="kw1">INDEX</span> u1   <span class="kw1">ON</span> sessions <span class="br0">&#40;</span>_utime<span class="br0">&#41;</span>;
<span class="kw1">CREATE</span> <span class="kw1">INDEX</span> ip1  <span class="kw1">ON</span> sessions <span class="kw1">USING</span> BTREE <span class="br0">&#40;</span>ipAddr<span class="br0">&#41;</span>;</pre>
<div class="noteimportant">For Session Explorer and one-off sessions, it is recommended to use BTREE or any index method that indexes partial content.
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
174
</div>
Xavier Guimard's avatar
Xavier Guimard committed
175 176 177 178
<p>
“id” fieds is set to <code>varchar(64)</code> (instead of char(32)) to use the now recommended SHA256 hash algorithm. See <a href="documentation/latest/sessions.html" class="wikilink1" title="documentation:latest:sessions">Sessions</a> for more details.
</p>
<div class="notetip">With new Apache::Session::Browseable::<strong>PgHstore</strong> and <strong>PgJSON</strong>, you don&#039;t need to declare indexes in <code>CREATE TABLE</code> since “json” and “hstore” type are browseable. You should anyway add some indexes <em>(see manpage)</em>.
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
179
</div>
Xavier Guimard's avatar
Xavier Guimard committed
180
</div>
Clément OUDOT's avatar
Clément OUDOT committed
181
<!-- EDIT7 SECTION "Prepare database" [2264-3488] -->
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
182 183 184 185
<h3 class="sectionedit8" id="manager">Manager</h3>
<div class="level3">

<p>
Clément OUDOT's avatar
Clément OUDOT committed
186
Go in the Manager and set the session module (<a href="https://metacpan.org/pod/Apache::Session::Browseable::MySQL" class="urlextern" title="https://metacpan.org/pod/Apache::Session::Browseable::MySQL"  rel="nofollow">Apache::Session::Browseable::MySQL</a> for MySQL) in <code>General parameters</code> » <code>Sessions</code> » <code>Session storage</code> » <code>Apache::Session module</code> and add the following parameters (case sensitive):
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
187 188 189 190 191 192 193 194 195 196 197
</p>
<div class="table sectionedit9"><table class="inline table table-bordered table-striped">
	<thead>
	<tr class="row0 roweven">
		<th class="col0 centeralign" colspan="3">  Required parameters  </th>
	</tr>
	<tr class="row1 rowodd">
		<th class="col0 centeralign">  Name  </th><th class="col1 centeralign">  Comment  </th><th class="col2 centeralign">  Example  </th>
	</tr>
	</thead>
	<tr class="row2 roweven">
Clément OUDOT's avatar
Clément OUDOT committed
198
		<td class="col0 centeralign">  <strong>DataSource</strong>  </td><td class="col1"> The <a href="https://metacpan.org/pod/DBI" class="urlextern" title="https://metacpan.org/pod/DBI"  rel="nofollow">DBI</a> string </td><td class="col2"> dbi:Pg:database=sessions </td>
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
199 200 201 202 203 204 205 206
	</tr>
	<tr class="row3 rowodd">
		<td class="col0 centeralign">  <strong>UserName</strong>  </td><td class="col1"> The database username </td><td class="col2"> lemonldapng </td>
	</tr>
	<tr class="row4 roweven">
		<td class="col0 centeralign">  <strong>Password</strong>  </td><td class="col1"> The database password </td><td class="col2"> mysuperpassword </td>
	</tr>
	<tr class="row5 rowodd">
Xavier Guimard's avatar
Xavier Guimard committed
207
		<td class="col0 centeralign">  <strong>Index</strong>  </td><td class="col1"> Index </td><td class="col2"> _whatToTrace ipAddr _session_kind _utime </td>
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
208 209
	</tr>
</table></div>
Clément OUDOT's avatar
Clément OUDOT committed
210
<!-- EDIT9 TABLE [3811-4156] --><div class="notetip">Apache::Session::Browseable::MySQL doesn&#039;t use locks so performances are keeped.
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
211 212 213 214 215 216
<p>
For databases like PostgreSQL, don&#039;t forget to add “Commit” with a value of 1
</p>

</div>
</div>
Clément OUDOT's avatar
Clément OUDOT committed
217
<!-- EDIT8 SECTION "Manager" [3489-4335] -->
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
<h2 class="sectionedit10" id="browseable_ldap">Browseable LDAP</h2>
<div class="level2">

<p>
Go in the Manager and set the session module to <code>Apache::Session::Browseable::LDAP</code>. Then configure the options like in <a href="ldapsessionbackend.html" class="wikilink1" title="documentation:2.0:ldapsessionbackend">LDAP session backend</a>.
</p>

<p>
You need to add the <code>Index</code> field and can also configure the <code>ldapAttributeIndex</code> field to set the attribute name where index values will be stored.
</p>
<div class="table sectionedit11"><table class="inline table table-bordered table-striped">
	<thead>
	<tr class="row0 roweven">
		<th class="col0 centeralign" colspan="3">  Required parameters  </th>
	</tr>
	<tr class="row1 rowodd">
		<th class="col0 centeralign">  Name  </th><th class="col1 centeralign">  Comment  </th><th class="col2 centeralign">  Example  </th>
	</tr>
	</thead>
	<tr class="row2 roweven">
		<td class="col0 centeralign">  <strong>ldapServer</strong>  </td><td class="col1"> <abbr title="Uniform Resource Identifier">URI</abbr> of the server </td><td class="col2"> ldap://localhost </td>
	</tr>
	<tr class="row3 rowodd">
		<td class="col0 centeralign">  <strong>ldapConfBase</strong>  </td><td class="col1"> <abbr title="Distinguished Name">DN</abbr> of sessions branch </td><td class="col2"> ou=sessions,dc=example,dc=com </td>
	</tr>
	<tr class="row4 roweven">
		<td class="col0 centeralign">  <strong>ldapBindDN</strong>  </td><td class="col1"> Connection login </td><td class="col2"> cn=admin,dc=example,dc=password </td>
	</tr>
	<tr class="row5 rowodd">
		<td class="col0 centeralign">  <strong>ldapBindPassword</strong>  </td><td class="col1"> Connection password </td><td class="col2"> secret </td>
	</tr>
	<tr class="row6 roweven">
		<td class="col0 centeralign">  <strong>Index</strong>  </td><td class="col1"> Index list </td><td class="col2"> _whatToTrace ipAddr </td>
	</tr>
	<tr class="row7 rowodd">
		<th class="col0 centeralign" colspan="3">  Optional parameters  </th>
	</tr>
	<tr class="row8 roweven">
		<th class="col0 centeralign">  Name  </th><th class="col1 centeralign">  Comment  </th><th class="col2 centeralign">  Default value  </th>
	</tr>
	<tr class="row9 rowodd">
		<td class="col0 centeralign">  <strong>ldapObjectClass</strong>  </td><td class="col1"> Objectclass of the entry </td><td class="col2"> applicationProcess </td>
	</tr>
	<tr class="row10 roweven">
		<td class="col0 centeralign">  <strong>ldapAttributeId</strong>  </td><td class="col1"> Attribute storing session ID </td><td class="col2"> cn </td>
	</tr>
	<tr class="row11 rowodd">
		<td class="col0 centeralign">  <strong>ldapAttributeContent</strong>  </td><td class="col1"> Attribute storing session content </td><td class="col2"> description </td>
	</tr>
	<tr class="row12 roweven">
		<td class="col0 centeralign">  <strong>ldapAttributeIndex</strong>  </td><td class="col1"> Attribute storing index </td><td class="col2"> ou </td>
	</tr>
</table></div>
Clément OUDOT's avatar
Clément OUDOT committed
271
<!-- EDIT11 TABLE [4687-5421] -->
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
272
</div>
Clément OUDOT's avatar
Clément OUDOT committed
273
<!-- EDIT10 SECTION "Browseable LDAP" [4336-5422] -->
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
274 275 276 277 278 279 280 281 282 283 284 285
<h2 class="sectionedit12" id="security">Security</h2>
<div class="level2">

<p>
Restrict network access to the backend.
</p>

<p>
You can also use different user/password for your servers by overriding parameters <code>globalStorage</code> and <code>globalStorageOptions</code> in lemonldap-ng.ini file.
</p>

</div>
Clément OUDOT's avatar
Clément OUDOT committed
286
<!-- EDIT12 SECTION "Security" [5423-5642] -->
Xavier Guimard's avatar
Xavier Guimard committed
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302
<h2 class="sectionedit13" id="performances">Performances</h2>
<div class="level2">

<p>
Here are some recommended configurations:
</p>

<p>
<strong>Browseable::Postgres</strong>:
</p>
<pre class="code sql"><span class="kw1">CREATE</span> UNLOGGED <span class="kw1">TABLE</span> sessions <span class="br0">&#40;</span>
    id <span class="kw1">VARCHAR</span><span class="br0">&#40;</span><span class="nu0">64</span><span class="br0">&#41;</span> <span class="kw1">NOT</span> <span class="kw1">NULL</span> <span class="kw1">PRIMARY</span> <span class="kw1">KEY</span><span class="sy0">,</span>
    a_session text<span class="sy0">,</span>
    _whatToTrace text<span class="sy0">,</span>
    _session_kind text<span class="sy0">,</span>
    _utime <span class="kw1">BIGINT</span><span class="sy0">,</span>
Clément OUDOT's avatar
Clément OUDOT committed
303
    <span class="kw1">USER</span> text<span class="sy0">,</span>
Xavier Guimard's avatar
Xavier Guimard committed
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318
    ipAddr <span class="kw1">VARCHAR</span><span class="br0">&#40;</span><span class="nu0">64</span><span class="br0">&#41;</span>
<span class="br0">&#41;</span>;
<span class="kw1">CREATE</span> <span class="kw1">INDEX</span> uid1 <span class="kw1">ON</span> sessions <span class="kw1">USING</span> BTREE <span class="br0">&#40;</span>_whatToTrace text_pattern_ops<span class="br0">&#41;</span>;
<span class="kw1">CREATE</span> <span class="kw1">INDEX</span> _s1 <span class="kw1">ON</span> sessions <span class="br0">&#40;</span>_session_kind<span class="br0">&#41;</span>;
<span class="kw1">CREATE</span> <span class="kw1">INDEX</span> _u1 <span class="kw1">ON</span> sessions <span class="br0">&#40;</span>_utime<span class="br0">&#41;</span>;
<span class="kw1">CREATE</span> <span class="kw1">INDEX</span> ip1 <span class="kw1">ON</span> sessions <span class="kw1">USING</span> BTREE <span class="br0">&#40;</span>ipAddr<span class="br0">&#41;</span></pre>

<p>
<strong>Browseable::MySQL</strong>:
</p>
<pre class="code sql"><span class="kw1">CREATE</span> <span class="kw1">TABLE</span> sessions <span class="br0">&#40;</span>
    id <span class="kw1">VARCHAR</span><span class="br0">&#40;</span><span class="nu0">64</span><span class="br0">&#41;</span> <span class="kw1">NOT</span> <span class="kw1">NULL</span> <span class="kw1">PRIMARY</span> <span class="kw1">KEY</span><span class="sy0">,</span>
    a_session text<span class="sy0">,</span>
    _whatToTrace <span class="kw1">VARCHAR</span><span class="br0">&#40;</span><span class="nu0">64</span><span class="br0">&#41;</span><span class="sy0">,</span>
    _session_kind <span class="kw1">VARCHAR</span><span class="br0">&#40;</span><span class="nu0">15</span><span class="br0">&#41;</span><span class="sy0">,</span>
Clément OUDOT's avatar
Clément OUDOT committed
319
    <span class="kw1">USER</span> text<span class="sy0">,</span>
Xavier Guimard's avatar
Xavier Guimard committed
320 321 322 323 324 325 326 327
    _utime <span class="kw1">BIGINT</span>
<span class="br0">&#41;</span>;
<span class="kw1">CREATE</span> <span class="kw1">INDEX</span> uid1 <span class="kw1">ON</span> sessions <span class="br0">&#40;</span>_whatToTrace<span class="br0">&#41;</span> <span class="kw1">USING</span> BTREE;
<span class="kw1">CREATE</span> <span class="kw1">INDEX</span> _s1 <span class="kw1">ON</span> sessions <span class="br0">&#40;</span>_session_kind<span class="br0">&#41;</span>;
<span class="kw1">CREATE</span> <span class="kw1">INDEX</span> _u1 <span class="kw1">ON</span> sessions <span class="br0">&#40;</span>_utime<span class="br0">&#41;</span>;
<span class="kw1">CREATE</span> <span class="kw1">INDEX</span> ip1 <span class="kw1">ON</span> sessions <span class="br0">&#40;</span>ipAddr<span class="br0">&#41;</span> <span class="kw1">USING</span> BTREE;</pre>

</div>
Clément OUDOT's avatar
Clément OUDOT committed
328
<!-- EDIT13 SECTION "Performances" [5643-] --></div>
Clément OUDOT's avatar
New doc  
Clément OUDOT committed
329 330
</body>
</html>