Friday, January 02, 2009

Blood Sugar Control Linked to Memory Decline, Study Says



Spikes in blood sugar can take a toll on memory by affecting the dentate gyrus, an area of the brain within the hippocampus that helps form memories, a new study reports.

Researchers said the effects can be seen even when levels of blood sugar, or glucose, are only moderately elevated, a finding that may help explain normal age-related cognitive decline, since glucose regulation worsens with age.

The study, by researchers at Columbia University Medical Center and funded in part by the National Institute on Aging, was published in the December issue of Annals of Neurology.

“If we conclude this is underlying normal age-related cognitive decline, then it affects all of us,” said lead investigator Dr. Scott Small, associate professor of neurology at Columbia University Medical Center. The ability to regulate glucose starts deteriorating by the third or fourth decade of life, he added.

Since glucose regulation is improved with physical activity, Dr. Small said, “We have a behavioral recommendation — physical exercise.”

In the study, researchers used high-resolution functional magnetic resonance imaging to map brain regions in 240 elderly subjects. They found a correlation between elevated blood glucose levels and reduced cerebral blood volume, or blood flow, in the dentate gyrus, an indication of reduced metabolic activity and function in that region of the brain.

By manipulating blood sugar levels in mice and monkeys, researchers said, they tried to confirm a cause-and-effect relationship between the glucose spikes and the reduced blood volume, Dr. Small said.

Bruce S. McEwen, who heads the neuroendocrinology lab at Rockefeller University in New York and was not involved in the research, said the study’s findings were “compelling,” with important implications not just for the elderly but for the growing number of overweight children and teens at risk of Type 2 diabetes.

“When we think about diabetes, we think about heart disease and all the consequences for the rest of the body, but we usually don’t think about the brain,” he said. “This is something we’ve got to be really worried about. We need to think about their ultimate risks not only for cardiovascular disease and metabolic disorders, but also about their cognitive skills, and whether they will be able to keep up with the demands of education and a fast-paced complex society. That’s the part that scares the heck out of me.”

Previous observational studies have shown that physical activity reduces the risk of cognitive decline, and studies have also found that diabetes increases the risk of dementia. Earlier studies had also found a link between Type 2 diabetes and dysfunction in the dentate gyrus.

Sheri Colberg-Ochs, an associate professor of exercise science at Old Dominion University in Norfolk, Va., said her research has found that regular exercise, even light physical activity, can offset the potentially negative effects of Type 2 diabetes on cognitive function. It is not clear what the mechanism is, she said, but may have something to do with the effect of insulin.

“This new study is interesting in that it allows for a greater understanding of which region of the hippocampus is likely most affected by poorly controlled diabetes,” she said.

But the elevations in blood glucose seen in the new study are more subtle and would not be considered a disease state, Dr. Small said.

“It’s part of the normal process of aging, much like wrinkling of skin,” he said. “It happens to all of us inexorably, and it worsens progressively across the life span

db2diag.log hexadecimal error number to DB2 SQLCODE

The error number conversion table below is intended for the hex error # in db2diag.log to db2 sqlcode. For example, the hex error number ending with 80D3 can be looked up by db2 ? command using SQL4977N sqlcode. -4977 is equivalent to 4977N (N for negative).

Sorry for the messy of the following list. Copied it from somewhere. You can click on the post title to go to IBM site that has this list.

Return Code  SQL State  Reason Code  Description  

80D3  -4977   Invalid export directory specified  

80D4  -4978   Dropped table cannot be accessed  

80D5  -4979   Unable to export the dropped table data  

80D6  -1620  1  Unable to flush event monitor because it wasn't started  

80D7  -1620  2  Unable to flush event monitor because it is running at a pre-version 6 output level  

811E  -996   Invalid user-specified directory  

812F  -290   Access not allowed: table space is quiesced  

8130  -290   Access not allowed: table space is load-pending  

8131  -290   Access not allowed: table space is delete-pending  

8132  -290   Access not allowed: table space is backup-pending  

8133  -290   Access not allowed: table space is rollforward-pending  

8134  -290   Access not allowed: table space is rollforward-in-progress  

8135  -290   Access not allowed: table space is recovery-pending  

8136  -290   Access not allowed: table space is disabled  

8137  -290   Access not allowed  

8138  -291   Invalid state transition  

8139  -294   Container is already being used  

813A  -295   Container names are too long  

813B  -297   Path name is too long  

813C  -298   Bad container path  

813D  -299   Duplicate container  

813E  -257   Raw device is not allowed  

813F  -258   Add containers pending  

8146  -1442   Bad container size  

8173              No dirty buffers  

81A7               Invalid alternate  

8201  +100   End of file reached  

8203  -952   I/O Interrupt  

8212  -804   Invalid request  

8303  -952   Interrupt  

8380             No term  

8381             No interrupt  

8382             No interrupt  

8383             Incompatible release level  

8384             Operation not supported  

8385              Server/requester migration level incompatible  

8386              ASP protocol error  

8387             Bad ASP object OBJDSS  

8388             Bad FDOCA object  

8389             SNA protocol error  

838A             Invalid SQL request  

838B             Cursor already open  

838C             Cursor not open  

838D             Syntax error  

838E             Invalid FDOCA descriptor  

8390             End of SQLDTAGRP  

8394             Parameter Error  

8395             Value Error  

8396            SQLDA too small  

8397            Invalid RPYDSS  

8398            Parser syntax error  

8399            FDOCA Error  

839A            End of input  

839B            Code point not found  

839C            SQLCODE set in parse  

839D            Data descriptor mismatch  

839E            Required parameter not received  

839F            Bad format  

83A0            Duplicate parameters detected  

83A3            Translation substitution  

8401  +100   End of file reached  

8403  -952   Interrupt  

8404  -950   Active cursor  

8406  -508   Invalid cursor position  

842E  -659   Check-pending state  

8443  -804   General purpose validation error  

844B  -1477 Table not available because forward recovery encountered no log operation  

8451  -680   Too many columns  

8502  -911   Deadlock encountered  

8503  -1044 Interrupt  

8544  -911   Lock timeout with transaction rollback  

8550  -913   Lock timeout with statement rollback  

856D  -902   SQLCA has been built and saved in a component-specific control block  

8574  -1035  File open error  

8575  -1015  Database needs recovery  

8576  -1042  Deadlock start error  

8577              Deadlock stop error  

8578  -1034   Recovery failed  

8579               Conditional conflict  

85A1               Backup pending  

85A2               Recovery pending  

85A4  +993   Invalid new log path  

85A5  +995   Invalid current log path  

85A6  -1267  Exist file not found  

85AA                Table space rollforward stopped  

85AB                I/O error encountered  

85AC                Duplicate entry  

85B3                Missing log extent  

85B4                Log extent is of a different size  

85B5  -1472   System clock difference exceeds max_time_diff on connect (log synchronization)  

85B6  -1473   System clock difference exceeds max_time_diff on commit  

85B7  +1474  System clock difference exceeds max_time_diff on commit (read-only)  

85B8  -276   Restore pending  

85B9  -1275 Invalid stop time for rollforward  

85BA  -1276 Invalid time to stop rollforward  

85BB  -4970 Rollforward is missing log files  

85BC  -4971 Rollforward log is already truncated  

85BD  -4972 Rollforward log path is full  

85BE  -4973 Rollforward log mismatch  

85BF  -4974 Rollforward query error  

85C0  -4975 Rollforward cancelled  

85C1  -4976 Rollforward not issued on catalog  

85C3  -4906 Table space rollforward has invalid table space set  

85C4  -1278 Table space rollforward required for rollback  

85C5  -1280 Invalid stop time for table space rollforward  

8659             Term characters not provided  

865A              Conversion table not loaded  

865B              No conversion table exists  

865C              Invalid target code page  

865D              Invalid source code page  

865F  -5123   Invalid code page  

8660  -5124   Invalid country code  

8661  -5125   Incompatible CP and CC  

8662              Invalid stored procedure  

8663              Invalid name  

8664              Expired password  

8665              Bad password  

8666              User or group description over 8 characters  

8667              User or group ID over 8 characters  

8668              Password over 8 characters  

8669              Bad group ID  

866A              Bad user ID  

866E              Not a descendant  

866F              SMG started in background  

8670              Invalid thread ID  

867F  -10nn  Dropped current directory  

86A8              Range too large  

86A9              Invalid user name  

86AA              Owner died  

86AB              Path error  

86AC              Programming error  

86AD              Exit list full  

86AE              Exit list not found  

86AF              Services not initialized  

870B  -138  Invalid SUBSTR parameter  

8711  -910   Table or table space drop pending  

8712  -804   Invalid request  

8713  -804   Bad request context  

8714  -804   Invalid section number  

8719  -811   Non-unique answer  

871D  -994   Savepoint error  

871E  -996   Invalid directory, involving the path length of the REORG directory  

874A  -1476 Forced rollback on unit of work because of an error on number of log tables  

876B              Authorization error  

876C              Authorization with different ID  

876D  -902   SQLCA has been built and saved in a component-specific control block  

877E              RDS error  

8803  -1044   Interrupt  

8905  -803   Duplicate key  

8971              Index scan incomplete  

897A              Index end of file  

897B              Index internal error  

897D              User ID suspended  

8A72              Compilation error  

8B07  -302   Output truncated  

8B08  -413   Values out of range  

8B09  -304   Conversion overflow converting date or time to character string  

8B0A  -303   Incompatible types  

8B0C  -309   Null input invalid  

8B0D  -305   Null output invalid  

8B0E  -804   Invalid output type  

8B0F  -822   Invalid input address  

8B10  -802   Math overflow  

8B15  -311   Negative SQLDA length  

8B16  -301   Incompatible types (dynamic)  

8B17  -180   Time or date syntax error  

8B18  -181   Time or date range error  

8B1A  -404   String column overflow  

8B1B  -406   Numeric column overflow  

8B1C  -407   Non-nullable column  

8B1F  -183   Date/time arithmetic result out of range  

8B20  -182   Date/time arithmetic duration out of range  

8B21  -176   Translate scalar run-time error  

8B22  -436   Null term missing on input CSTR  

8B47  -304   Conversion overflow (numeric value)  

8B48  -302   Numeric value out of range  

8B49  -801   Divide by zero operation not allowed  

8B4C  -420   Invalid input format  

8B4D  -410   Float string too long  

8B4E              Null-only truncation  

8B4F              Date is truncated  

8C03  -952   Interrupt  

8C05  -803   Duplicate key  

9301              Allocation failure  

9302              Conversion failure  

9303              Transaction processor (TP) not started  

9304              TP limit reached  

9305              Remote TP exit normal  

9306              Allocation failed, attempting retry  

9307              Allocation failed, no retry attempted  

9308              General allocation error  

9309              Conversion failed, no retry attempted  

930A              TP not started, no retry attempted  

930B              Remote TP abend  

930C              Communications Manager not loaded  

930D              Communications Manager abend  

930E              Bad security on conversation  

930F              Unknown APPC error  

9310              Communications Manager parameter bad  

9311              Communications Manager bad request state  

9312              External communications error  

9313              Remote TP send error  

9332              Invalid name or name number  

9333              Invalid session ID  

9334              Invalid command  

9335              Invalid data  

9336              Adapter error  

9337              Reset error  

9338              Other NetBIOS error  

9364              Node environment is corrupted  

960C              Communications Manager not loaded  

960F              Generic APPC error  

9617              Already connected  

9618              Connection in progress  

9619              Connection refused  

962A              Connection timed out  

962B              Address already in use  

962C              No connection  

962D              Socket is bound already  

962E              Socket is not bound yet  

962F              Socket not writable/readable yet  

9630              Partial message was sent  

9631              Partial message was received  

9C14              FCM communication error  

9C15              FCM node not found  

9C16  -1229   Node recovery  

A602  -901   Invalid memory address  

A603  -901   General memory management error  

A604  -901   Memory management error: invalid size  

AB01  -901   Internal error  

AC01  -901   Internal program error  

C107  -986   File error  

C109  -8100 Segmented tables, page number too high  

C119  -995   EMP indirect not found  

C11A  -995   EMP map information ended  

C11B  -995   EMP map information not found  

C11C  -996   Mapping information should exist, but cannot be found  

C11D  -292   Cannot create file  

C11E  -293   Container not accessible  

C180              Agent file close error  

C201  -970   Access denied  

C211              Seek error  

C212              Unknown media error  

C213              File not found  

C214              File already exists  

C215              File in use  

C216              Invalid file name  

C217              Commit failed  

C218              Undo failed  

C40A  -659     Maximum object size reached  

C47E              Index needs to be recreated  

C47F              File renamed  

C57F              File renamed  

C601  -970   Access denied  

C602  -972   Change disk  

C603  -972   Not a DOS disk  

C604  -974   Drive locked  

C605  -976   Device not ready  

C606  -978   File write-protected  

C607  -986   File error  

C608  -902   Delete directory error  

C67C              Device is busy  

C721  -2423   Missing index during offline backup  

C90A              Maximum object size reached  

CE0B  -1614  1  Encountered an unknown event monitor target type  

CE0C  -1614  2  The event monitor target path was not sent  

CE0D  -1614  3  Access to event monitor target path was denied  

CE0E  -1614  4  Event monitor target path is not the name of a pipe  

CE0F  -1614  5  No process has opened the event monitor target pipe for reading  

CE10  -1614  6  Encountered an unexpected I/0 error.  

D085  

21  Authentication failed due to no user licenses available  

D107  -960   No more file tokens  

D121  -289   Container full  

D122              Exceeded maximum quiescers  

D123  -296   Table space limit exceeded  

D124  -259   Map too big  

D20C  -968   Disk full  

D21A  -930   No memory: UNDO heap  

D315              No memory on requester  

D316              No memory on server  

D31D              Vectored I/O request too big  

D408  -962   Maximum tables in file  

D40D  -912   Too many locks  

D411  -902   Maximum long field file size  

D505  -930   Memory allocation failure  

D509  -964   Log file full  

D50A  -912   Lock list full  

D57F  -1004 Disk full log file  

D601  -954   No memory heap (for application)  

D602  -956   No memory heap (for database)  

D603  -101   No memory heap  

D604  -930   Share buffer exceeded  

D605  -930   Memory allocation failure  

D606  -958   Too many open files  

D607  -960   No more file tokens  

D60B  -955   No memory sort heap  

D60C  -968   Disk full  

D60D  -912   Too many locks  

D60E  -973   No memory  

D610  -902   No memory BSU heap  

D612  -953   No memory: AgentHeap  

D613  -957, -959  

No memory: ComHeap  

D614  -961, -962  

No memory: RSHeap  

D615             No memory: Users/groups  

D616  -930   No memory: DrIdx heap  

D617  -930   No memory: ASP heap  

D619  -930   No memory: Queue heap  

D61A  -930   No memory: UND heap  

D61B  -930   No memory: Lock heap  

D61C  -930   No memory: System heap  

D61D  -930   No memory  

D61E  -930   No memory  

D620  -930   No memory  

D625  -930   No memory  

D62B  -930  No memory  

D67D              Shared memory set exists  

D67E  -9  No memory for DosLoadMod  

D905  -930   Memory allocation failure  

D90F  -990  Index structure problem  

DC26  -6042 No FCM MSG_ANCHOR  

DC27  -6040 No FCM buffer  

DC28  -6041 No FCM connection entry  

DC29  -6043 No FCM request block  

DC2A  -902  No high priority buffer  

E101  -980  1  Bad page  

E10A  -980  10  File does not exist  

E10E  -982   Bad signature  

E119  -1034 Page CHECKSUM error  

E11A  -1035 Bad database, won't flush it  

E11B  -980  27  Both primary and shadow ORFs are bad  

E11C  -980  28  Primary ORF is bad  

E11D  -980  29  Secondary ORF is bad  

E11E  -980  30  Both primary and shadow SSFs are bad  

E11F  -980  31  Primary SSF bad  

E120  -980  32  Secondary SSF bad  

E40B  -980  11  Object does not exist  

E50D  -980  13  Bad log file  

E510  -5123   Error in log control file  

E511  -1258   Log control file not found  

E512  -1259   I/O error accessing log control file  

E513  -1260   Database not recoverable  

E514  -1261   Recovery not pending  

E515  -1263   Invalid log extent file  

E516  -1264   Log extent file does not belong to the database  

E517  -1265   Log extent file is the incorrect version  

E518  -1266   Point in time prior to recovery  

E521  -1034   Recovery failed  

E522  -1269   Error while retrieving file during forward recovery  

E57F  -1036   Adjust log file error  

E602  -980  2  CRC error  

E603  -980  3  Disk error  

E604  -980  4  General failure  

E605  -980  5  Read fault  

E606  -980  6  Seek error  

E607  -980  7  Sector not found  

E608  -980  8  Unknown media error  

E609  -980  9  Write fault  

E60A  -980  10  File does not exist  

E60C  -980  12  Cannot open file  

E60F  -980  15  Network access denied  

E623  -931     Too many open system files  

F051  -1042   Invalid log record encountered during redo or undo: unknown component  

F102  -902  2  BPS logic error  

F103  -902  3  Invalid buffer pointer  

F104  -902  4  No buffers  

F109  -902  9  Data does not exist  

F10A  -902  10  File already exists  

F10B  -902  11  Unfixed buffer page  

F10C  -902  12  Invalid file token  

F10D  -902  13  Invalid file type  

F110  -902  16  Invalid mode parameter  

F117  -902  23  Invalid reference  

F121  -902  33  RAM semaphore error  

F124  -902  36  Bad configuration file  

F136  -902  54  Bad header  

F13B  -902  59  File not found in the reorg linked list  

F149  -902  73  Bad database path  

F156  -902  86  Page already exists  

F176  -902  118  Invalid pool ID  

F17D              State already off  

F210  -902  16  Invalid mode parameter  

F21B  -902  27  Bad transaction ID  

F225  -902  37  Invalid file handle  

F331  -902  49  Bad selector  

F33C  -902  60  Tokenizer stack overflow  

F345              The server STARTDBM failed  

F34A  -902  74  Node manager thread failed  

F34B  -902  75  Database is bad  

F34C  -902  76  Parser stack overflow  

F34D  -902  77  Token buffer overflow  

F34E  -902  78  Bad value in code page table  

F34F  -902  79  Configuration mismatch  

F401  -902  1  DMS data file error  

F418  -902  24  Bad table handle  

F419  -902  25  Bad record ID  

F42D  -902  45  Reallocation error  

F42E  -902  46  Set signal error  

F42F  -902  47  Invalid mode  

F432  -902  50  Floating point error  

F451  -1042   Invalid log record encountered during redo or undo: bad record length  

F455  -902  85  Program error  

F47A  -902  122  Record deleted  

F47C  -902  124  Missing defaults  

F51B  -902  27  Bad transaction ID  

F51C  -902  28  Log file overflow  

F51D  -902  29  Fatal logic error  

F51E  -902  30  No active transaction  

F51F  -902  31  Maximum save points  

F520  -902  32  No active save point  

F527  -902  39  Bad record type  

F528  -902  40  Transaction ID table overflow  

F529  -902  41  Invalid LSN  

F52A  -902  42  Transaction already started  

F550  -902  80  Database in recovery mode  

F605  -1068   Message file not found  

F606  -1068   Message not found  

F609  -902  9  Data does not exist  

F60A  -902  10  File already exists  

F60B  -902  11  Unfixed buffer page  

F60C  -902  12  Invalid file token  

F60D  -902  13  Invalid file type  

F60E  -902  14  Lock violation  

F60F  -902  15  Directory overflow  

F610  -902  16  Invalid mode parameter  

F611  -902  17  Invalid path  

F612  -902  18  Invalid page number  

F613  -902  19  Sector boundary error  

F614  -902  20  System internal error  

F616  -902  22  File sharing error  

F617  -902  23  Invalid reference  

F61A  -902  26  Invalid selector  

F621  -902  33  RAM semaphore error  

F622  -902  34  Access error  

F624  -902  36  Bad configuration file  

F625  -902  37  Invalid file handle  

F626  -902  38  No file descriptor  

F631  -902  49  Bad selector  

F635  -902  53  Conditional failure  

F637  -902  55  Infinite retry  

F638  -902  56  Stored procedure not found  

F639  -902  57  Invalid drive  

F63A  -902  58  Bad heap ID  

F63D  -902  61  Duplicate queue  

F63E  -902  62  Bad queue handle  

F63F  -902  63  Queue message too big  

F640  -902  64  No message in queue  

F641  -902  65  Message not sent  

F642  -902  66  Queue does not exist  

F643  -902  67  Max queue limit  

F644  -902  68  Invalid queue name  

F690              DB2NODE environment variable has a bad value  

F691              The db2nodes.cfg file contains an error  

F730  -902  48  Invalid file  

F733  -902  51  Invalid compile request  

F85F  -902  95  Generic LOB manager error  

F860  -902  96  Cannot redo operation  

F861  -902  97  Beginning segment (BSEG) already trimmed  

F862  -902  98  Insufficient space  

F863  -902  99  No mini directory  

F864  -902  100  Invalid LM descriptor  

F865  -902  101  Invalid address  

F866  -902  102  LF space exhausted  

F867  -902  103  BSEG size/address conflict  

F868  -902  104  BSEG not free or allocated  

F869  -902  105  Incorrect BSEG size  

F86A  -902  106  BSEG not free  

F86B  -902  107  Bad count array  

F86C  -902  108  Lock error  

F86D  -902  109  Not found error  

F86E  -902  110  Value out of bounds  

F86F  -902  111  Unexpected NULL value  

F870  -902  112  Encountered fatal error  

F871  -902  113  Bad state  

F872  -902  114  Request too big  

F873              No slots for threads  

F874              Thread not waiting  

F875              Owner died  

F87B              Too many active threads  

F912  -902  18  Invalid page number  

F915  -902  21  Memory allocation error  

F92B  -902  43  Index token does not exist  

F92C  -902  44  Key not found  

F952  -902  82  SMP problems  

F953  -902  83  Invalid database release  

F954  -902  84  Program error  

FB2E  -902  46  Set signal error  

FC07  -902  7  Severe internal error  

FC21  -902  33  RAM semaphore error  

FC7E  -902  126  Component interface error  

FC7F  -902  127  FCM programming error  

FC80  -902  128  FCM daemon not available  

FC81  -902  129  FCM node configuration file error  

FC88  -902  136  BDS communication error  

FC89  -902  137  BDS partner error  

FC8F  -1445   No Context  

FD8A  -902  138  Invalid partition map ID  

FD8B  -902  139  Not able to fetch from catalog  

FD8C  -902  140  Invalid data type  

FD8D              Invalid partition number  

FD8E              PMAP is of a 1-node nodegroup


More information on interpreting db2diag.log entries.



Top Blogs

Thursday, January 01, 2009

The way the brain buys



Retailers are making breakthroughs in understanding their customers’ minds. Here is what they know about you

IT MAY have occurred to you, during the course of a dismal trawl round a supermarket indistinguishable from every other supermarket you have ever been into, to wonder why they are all the same. The answer is more sinister than depressing. It is not because the companies that operate them lack imagination. It is because they are all versed in the science of persuading people to buy things—a science that, thanks to technological advances, is beginning to unlock the innermost secrets of the consumer’s mind.

In the Sainsbury’s in Hatch Warren, Basingstoke, south-west of London, it takes a while for the mind to get into a shopping mode. This is why the area immediately inside the entrance of a supermarket is known as the “decompression zone”. People need to slow down and take stock of the surroundings, even if they are regulars. In sales terms this area is a bit of a loss, so it tends to be used more for promotion. Even the multi-packs of beer piled up here are designed more to hint at bargains within than to be lugged round the aisles. Wal-Mart, the world’s biggest retailer, famously employs “greeters” at the entrance to its stores. Whether or not they boost sales, a friendly welcome is said to cut shoplifting. It is harder to steal from nice people.

Immediately to the left in Sainsbury’s is another familiar sight: a “chill zone” for browsing magazines, books and DVDs, tempting impromptu purchases and slowing customers down. But those on a serious mission will keep walking ahead—and the first thing they come to is the fresh fruit and vegetables section.

For shoppers, this makes no sense. Fruit and vegetables can be easily damaged, so they should be bought at the end, not the beginning, of a shopping trip. But psychology is at work here: selecting good wholesome fresh food is an uplifting way to start shopping, and it makes people feel less guilty about reaching for the stodgy stuff later on.

Shoppers already know that everyday items, like milk, are invariably placed towards the back of a store to provide more opportunity to tempt customers. This is why pharmacies are generally at the rear, even in “convenience” stores. But supermarkets know shoppers know this, so they use other tricks, like placing popular items halfway along a section so that people have to walk all along the aisle looking for them. The idea is to boost “dwell time”: the length of time people spend in a store.

Traditionally retailers measure “footfall”, as the number of people entering a store is known, but those numbers say nothing about where people go and how long they spend there. But nowadays, a ubiquitous piece of technology can fill the gap: the mobile phone. Path Intelligence, a British company working with the Massachusetts Institute of Technology, tracked people’s phones at Gunwharf Quays, a large retail and leisure centre in Portsmouth—not by monitoring calls, but by plotting the positions of handsets as they transmit automatically to cellular networks. It found that when dwell time rose 1% sales rose 1.3%.

Having walked to the end of the fruit and vegetable aisle, Basingstoke’s hard-core shoppers arrive at counters of prepared food, the fishmonger, the butcher and the deli. Then there is the in-store bakery, which can be smelt before it is seen. Even small supermarkets now use in-store bakeries. Mostly these bake pre-prepared items and frozen dough, and they have boomed even though central bakeries that deliver to a number of stores are much more efficient. They do it for the smell of freshly baked bread, which makes people hungry and thus encourages people to buy not just bread but also other food, including frozen stuff.

Most of the information that shoppers are bombarded with is visual: labels, price stickers and advertising. But the wafting bread aroma shows smell can usefully be stimulated too, says Simon Harrop, chief executive of BRAND sense agency, a British specialist in multi-sensory marketing. In the aisle by the laundry section he suggests introducing the smell of freshly laundered sheets. Even the sound of sheets being folded could be reproduced here and contained within the area using the latest audio technology. The Aroma Company, which Mr Harrop founded, has put the smell of coconut into the shops of Thompson, a British travel agent. Some suntan oils smell of coconut, so the scent is supposed to remind people of past holidays. The company even infuses the fresh smell of citrus into a range of clothing made by Odeur, a Swedish company. It can waft for up to 13 washes.

Such techniques are increasingly popular because of a deepening understanding about how shoppers make choices. People tell market researchers and “focus groups” that they make rational decisions about what to buy, considering things like price, selection or convenience. But subconscious forces, involving emotion and memories, are clearly also at work.

Scientists used to assume that emotion and rationality were opposed to each other, but Antonio Damasio, now professor of neuroscience at the University of Southern California, has found that people who lose the ability to perceive or experience emotions as the result of a brain injury find it hard or impossible to make any decisions at all. They can’t shop.

Oh, that’s what I want
Researchers are now exploring these mechanisms by observing the brain at work. One of the most promising techniques is functional magnetic resonance imaging (fMRI), which uses a large scanner to detect changes in the blood flow in parts of the brain that correspond to increases or decreases in mental activity. People lying inside the scanners are shown different products or brands and then asked questions about them. What they say is compared with what they are thinking by looking at cognitive or emotional activity. The idea is that if, say, a part of the brain that is associated with pleasure lights up, then the product could be a winner. This is immensely valuable information because eight out of ten new consumer products usually fail, despite test marketing on people who say they would buy the item—but whose subconscious may have been thinking something different.

“We are just at the frontier of the subconscious,” says Eric Spangenberg, dean of the College of Business at Washington State University and an expert on the subtleties of marketing. “We know it’s there, we know there are responses and we know it is significant.” But companies commissioning such studies keep the results secret for commercial reasons. This makes Dr Spangenberg sure of one thing: “What I think I know, they probably know way more.”

We are just at the frontier of the subconsciousRetailers and producers talk a lot about the “moment of truth”. This is not a philosophical notion, but the point when people standing in the aisle decide what to buy and reach to get it. The Basingstoke store illustrates some of the ways used to get shoppers’ hands to wobble in the direction of a particular product. At the instant coffee selection, for example, branded products from the big producers are arranged at eye-level while cheaper ones are lower down, along with the supermarket’s own-label products.

Often head offices will send out elaborate plans of where everything has to be placed; Albertsons, a big American supermarket chain, calls these a “plan-a-gram”. Spot-checks are carried out to make sure instructions are followed to the letter. The reason for this strictness is that big retailers demand “slotting fees” to put suppliers’ goods on their shelves, and these vary according to which positions are considered to be prime space.

But shelf-positioning is fiercely fought over, not just by those trying to sell goods, but also by those arguing over how best to manipulate shoppers. Never mind all the academic papers written on how best to stack shelves, retailers have their own views. While many stores reckon eye-level is the top spot, some think a little higher is better. Others charge more for goods placed on “end caps”—displays at the end of the aisles which they reckon to have the greatest visibility (although some experts say it all depends on the direction in which people gyrate around a store—and opinion on that is also divided). To be on the right-hand-side of an eye-level selection is often considered the very best place, because most people are right-handed and most people’s eyes drift rightwards. Some supermarkets reserve that for their own-label “premium” goods. And supermarkets may categorise things in different ways, so chapatis may not be with breads, but with ready-meals of the Indian variety. So, even though some suppliers could be paying around $50,000 per store a year for a few feet of shelf space, many customers still can’t find what they are looking for.

Technology is making the process of monitoring shopper behaviour easier—which is why the security cameras in a store may be doing a lot more than simply watching out for theft. Rajeev Sharma, of Pennsylvania State University, founded a company called VideoMining to automate the process. It uses image-recognition software to scan the pictures from security cameras of shoppers while they are making their selections. It is capable of looking at the actions of hundreds of thousands of people. It can measure how many went straight to one brand, the number that dithered and those that compared several, at the same time as sorting shoppers by age, gender and ethnicity.

VideoMining analysed people in convenience stores buying beer. Typically it would take them two minutes, with the majority going straight to one brand. “This shows their mind was already made up; they were on autopilot,” says Dr Sharma. So brewers should spend their marketing money outside, not inside, the store. The analysis can also help establish the return on investment to a new advertising campaign by showing what proportion of beer-buyers can be persuaded to consider rival brands. Another study in a supermarket some 12% of people spent 90 seconds looking at juices, studying the labels but not selecting any. In supermarket decision-making time, that is forever. This implies that shoppers are very interested in juices as a healthy alternative to carbonated drinks, but are not sure which to buy. So there is a lot of scope for persuasion.

Reducing the selection on offer might help too. Cassie Mogilner of Stanford University and her colleagues found in a study that consumers like unfamiliar products to be categorised—even if the categories are meaningless. In a study of different coffees they found people were more satisfied with their choice if it came from a categorised selection, although it did not matter if the categories were marked simply A, B and C, or “mild”, “dark roast” and “nutty”.

Despite all the new technology, simply talking to consumers remains one of the most effective ways to improve the “customer experience”. Scott Bearse, a retail expert with Deloitte Consulting in Boston, Massachusetts, has led projects observing and quizzing tens of thousands of customers about how they feel about shopping. It began when a client complained that he had mountains of data on the one in four people that entered his store and bought something, but knew hardly anything about the vast majority who left without making a purchase. The “customer conversion” rate varies between types of store: it could be around 20% in some department stores but reach almost 100% in a grocery. And within the same store the conversion rate will vary in different sections.

People say they leave shops empty-handed more often because they are “unable to decide” than because prices are too high, says Mr Bearse. Working out what turns customers off is not difficult, yet stores still struggle with these issues: goods out of stock, long queues at the checkouts and poor levels of service. Getting customers to try something is one of the best ways of getting them to buy, adds Mr Bearse. Deloitte found that customers using fitting rooms convert at a rate of 85% compared with 58% for those that do not do so.

Often a customer struggling to decide which of two items is best ends up not buying either. A third “decoy” item, which is not quite as good as the other two, can make the choice easier and more pleasurable, according to a new study using fMRI carried out by Akshay Rao, a professor of marketing at the University of Minnesota. Happier customers are more likely to buy. Dr Rao believes the deliberate use of irrelevant alternatives should work in selling all sorts of goods and services, from cable TV to holidays.

The notion of shoppers wearing brain-scanning hats would be ridiculousA lack of price tags is another turn-off, although getting that right will become crucial with the increasing use of Radio Frequency Identification (RFID) tags. These contain far more information than bar codes and can be scanned remotely. People have been predicting for years that they would shortly become ubiquitous; but, with costs continuing to fall, they eventually will. Tills will then become redundant, because everything shoppers put in their trolleys will be automatically detected and charged to their credit cards.

The basic mechanisms to do this are already in place. A store or loyalty card can be fitted with an RFID tag to identify customers on arrival. A device on the trolley could monitor everything placed in it, check with past spending patterns and nudge customers: “You have just passed the Oriels, which you usually buy here.”

Mind over matter
Technology will also begin to identify customers’ emotions. Dr Sharma’s software has the potential to analyse expressions, like smiles and grimaces, which are hard to fake. And although fMRI scanners presently need a crane to move, something that provides a similar result might one day be worn on your head. Researchers believe it is possible to correlate brain patterns with changes in electrical activity in the brain, which can be measured with electroencephalography (EEG) using electrodes placed on the scalp. Small EEG machines are already available, especially for computer gamers, which fit on the head.

The notion of shoppers wearing brain-scanning hats would be ridiculous if it were not so alarming. Privacy groups are already concerned about the rise of electronic surveillance that records what people do, let alone what they might be thinking. The San Francisco-based Electronic Frontier Foundation is concerned that because RFID tags can be read at a distance by anyone with the necessary equipment they could create “privacy pollution”; being used to discover what is in not only someone’s shopping trolley, but also their cupboards.

To some degree shoppers would have to “buy in” to the process: a bit like having an account with an online retailer which comes with the explicit knowledge that your past purchases and browsing history will be monitored and used to pitch purchase suggestions. And if that makes shopping easier—especially if sweetened with discounts—then consumers might sign up to it. When Dr Sharma asks shoppers what they think about his video-monitoring he says most people do not mind.

But what if psychological selling is done stealthily? That way lies grave perils. It is the anger not of privacy groups that retailers should fear, but of customers at being manipulated from behind the scenes.

There have been backlashes before: “The Hidden Persuaders” by Vance Packard, an American journalist, caused a sensation when it was first published in 1957 by revealing physiological techniques used by advertisers, including subliminal messages. It is what got Dr Spangenberg interested in the subject. He thinks shopping science has limits. “I don’t think you are going to be able to make someone buy a car or a computer that they don’t need,” he says. “But you might persuade them to choose one model instead of another. And importantly, they wouldn’t know it.” But if they did realise psychological methods were being used to influence their choice, “the counteraction can be so huge it can put someone off buying anything at all,” he adds.

Which is probably why at the end of this shopping trip there is not much in the trolley. At least the temptations at the checkout are easy to avoid: a few celebrity magazines and bags of sweets at the eye-level of children. But that will change too.

Barry Salzman, the chief executive of YCD Multimedia in New York, has big plans for the area around a cash till. He is using digital video screens displaying ads that relate to what someone is buying and which can also be linked with facial-recognition software to refine the displays according to the customer’s age or sex. His system is already being used in Aroma Espresso Bars in America to present, say, an advert for a chocolate croissant to someone buying only a cappuccino.

But the checkout in this Sainsbury’s comes to a halt because the teenager at the till is not old enough to sell alcohol and can’t attract the attention of a supervisor for permission to ring up a multi-pack of beer, which is therefore left behind on the counter. The science of shopping is a marvellously sophisticated business; the practice is still a little more primitive.